banner



How To Get Better Accuracy

How to better your models from seventy% accuracy to over 90%

Photo from Pexels by Sora Shimazaki

Creating car learning models is a complex process that even the nearly experienced data scientists ofttimes brand mistakes in.

If you lot desire your machine learning models to be as accurate as possible, you lot need to exist aware of the ways that yous can meliorate them.

In this mail, nosotros volition hash out five ways to improve the accuracy of your machine learning models!

1. Handling Missing Values & Outliers

One of the easiest means to meliorate the accuracy of your machine learning models is to handle missing values and outliers.

If yous have data that is missing values or contains outliers, your models volition probable be less authentic. This is because missing values and outliers can crusade the model to brand incorrect assumptions about your information.

For case, imagine you have a dataset with tiptop and weight measurements for people who are all roughly the same age (i.e., adults). If ane of them is missing their weight measurement while another has an unusually high or low value for their weight, then your model will make wrong assumptions about these two individuals based on their height alone.

It's besides of import to annotation that missing values and outliers tin cause your models to overfit or underfit!

There are a number of ways that you can handle missing values and outliers.

Y'all tin can:

  • Remove the data points that contain missing values or outliers from your preparation dataset.
  • Impute the missing values using a technique similar chiliad-nearest neighbors or linear regression.
  • Apply a technique similar bootstrapping to remove the influence of the outlier data

two. Feature Applied science

Characteristic applied science is the art of creating new features from your existing ones.

For example, y'all might create a feature that represents how far away someone lives from their workplace based on two other features: "home address" and "workplace location".

Feature applied science helps improve the accuracy of machine learning models by assuasive them to brand more accurate predictions.

One of the most mutual means to create new features is by combining multiple existing ones into one or more new features.

For case, you might combine "age" with "weight" and "height" to create a characteristic called Body Mass Alphabetize (BMI). This allows your model to make meliorate predictions as there's less features and less racket in your model.

There are many unlike ways to engineer features, and the best style to do it often depends on the dataset you're working with.

Still, a few tips that might be useful include:

  • Endeavour to find correlations between different features and create new ones that capture these relationships.
  • Utilise transforms like logarithmic transformation or standardization to brand your features more than comparable and easier to work with.
  • Make use of data pre-processing techniques like feature extraction and selection to assist yous notice the most important features in your dataset.

three. Characteristic Selection

Feature option is a process that helps you place the well-nigh useful features in your dataset.

Its goal is to reduce or eliminate noise and meliorate the accuracy of machine learning models by removing redundant information from them (i.eastward., data points containing only one feature).

In that location are many dissimilar ways to select features, but they all involve either using some form of statistical analysis or filtering out features with low importance scores (i.e., those that don't contribute much to the accuracy of your model).

Some common techniques for feature option include:

  • Ranking features based on their correlation with other variables in the dataset, then removing those that are less correlated than others. For example, you could utilize the Pearson Correlation Coefficient to measure the strength of the human relationship between two variables.
  • Filtering features based on their importance scores, which are usually calculated using a technique similar slope descent or random forests.
  • Selecting a subset of features that have a high correlation with the target variable only low correlations among themselves (i.due east., they are uncorrelated or contained of each other).

4. Effort Multiple Algorithms

A mutual mistake is to only endeavour i algorithm when training your model. While this might work if you have a lot of data and information technology's easy enough for the algorithm to acquire from, most existent-globe datasets are much more circuitous than that.

At that place will probable exist some features in your dataset that don't contribute much to the accurateness of your model, and removing them will merely make things worse.

This is where using multiple algorithms can be helpful.

By trying different algorithms, you can place which ones piece of work best for your data and then utilise that information to ameliorate the accuracy of your models.

There are many different types of car learning algorithms, so it can be hard to know which ones are right for your data. A good place to kickoff is past using cross-validation with multiple algorithms on the same dataset and and then comparing their accurateness scores against each other.

If y'all're working in Python, scikit-larn has a nice list of common car learning models that you can attempt out on your information including:

  • Linear Regression
  • Back up Vector Machines
  • Conclusion Trees
  • Random Forests
  • Neural Networks

Ensemble Models

Some other approach is to use an ensemble method, which combines two or more algorithms together into one model. Ensembles are oft more accurate than whatsoever individual algorithm because they leverage the strengths of each and recoup for their weaknesses.

In other words, if you lot combine multiple weak learners (i.e., models that perform poorly on their ain) into one ensemble, yous tin can become a stronger learner (i.east., a model that performs well every bit an individual).

5. Adjusting Hyperparameters

Hyperparameters are the parameters in machine learning models that make up one's mind how they work.

These parameters can include things like the number of layers in a deep neural network, or how many trees there should be in an ensemble model.

You usually need to adjust these hyperparameters yourself considering they aren't automatically ready when yous train your model.

This is where cross-validation tin be helpful. By splitting your information into training and examination sets, yous can try different combinations of hyperparameters on the training gear up and so see how well they perform on the test set. This helps you to find the best combination of hyperparameters for your model.

Another way to exercise this is by using filigree search, which is a method of finding the optimal combination of hyperparameters for your data.

Grid search works past trying out every possible combination of parameters in social club until it finds i that gives you the best performance on your metric (east.thousand., accuracy). You lot can then utilize that combination of hyperparameters to train your model.

You tin utilize Grid Search through the scikit-learn library in Python.

Conclusion

There are many ways to improve the accuracy of your machine learning models. Past using methods like feature engineering science, adjusting hyperparameters, and trying multiple algorithms, you give yourself a great modify to create a really accurate model.

The near important thing is to keep experimenting and learning from your mistakes. The more than you know virtually your data and the algorithms you're using, the meliorate your models will perform.

Bring together my e-mail list with 5k+ people to get "The Complete Python for Information Science Cheat Sail Booklet" for FREE

How To Get Better Accuracy,

Source: https://towardsdatascience.com/5-effective-ways-to-improve-the-accuracy-of-your-machine-learning-models-f1ea1f2b5d65

Posted by: tracyappot1978.blogspot.com

0 Response to "How To Get Better Accuracy"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel