Machine Learning

12 Common Errors in Machine Learning

Examining various types of error that can impact the predictive power of a model

Image for post
Image for post
Photo by Free To Use Sounds on Unsplash

1. Error in Data Collection

2. Error in Data Storage

3. Error in Data Retrieval

4. Data Imputation Error

5. Scaling Error

6. Bias Error

7. Variance Error

Image for post
Image for post
Illustration of bias error (underfit) and variance error (overfit). Image source: Simplicity vs. Complexity in Machine Learning — Finding the Right Balance, Benjamin O. Tayo

8. Random Error

Image for post
Image for post
k-fold cross-validation pseudocode. Photo by Benjamin O. Tayo
Image for post
Image for post
Sample R2 outputs from k-fold cross-validation calculation. Source: Hands-on k-fold Cross-validation for Machine Learning Model Evaluation — Cruise Ship Dataset, Benjamin O. Tayo

9. Error from Hyperparameter Tuning

Image for post
Image for post
Regression analysis using different values of the learning rate parameter. Source: Bad and Good Regression Analysis, Published in Towards AI, February 2019, by Benjamin O. Tayo.
Perceptron(n_iter=40, eta0=0.1, random_state=0)train_test_split( X, y, test_size=0.4, random_state=0)LogisticRegression(C=1000.0, random_state=0)KNeighborsClassifier(n_neighbors=5, p=2, metric='minkowski')SVC(kernel='linear', C=1.0, random_state=0)DecisionTreeClassifier(criterion='entropy', 
max_depth=3, random_state=0)
Lasso(alpha = 0.1)PCA(n_components = 4)

10. Model Selection Error

LogisticRegression()KNeighborsClassifier()SVC()DecisionTreeClassifier()RandomForestClassifier()GaussianNB()

11. Ethical Error

12. Generalization/Feedback Error

References

Additional Data Science/Machine Learning Resources

Towards AI

The Best of Tech, Science, and Engineering.

Sign up for Towards AI Newsletter

By Towards AI

Towards AI publishes the best of tech, science, and engineering. Subscribe to receive our updates right in your inbox. Interested in working with us? Please contact us → https://towardsai.net/contact Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Benjamin Obi Tayo Ph.D.

Written by

Physicist, Data Science Educator, Writer. Interests: Data Science, Machine Learning, AI, Python & R, Predictive Analytics, Materials Sciences, Biophysics

Towards AI

Towards AI is the world’s leading multidisciplinary science publication. Towards AI publishes the best of tech, science, and engineering. Read by thought-leaders and decision-makers around the world.

Benjamin Obi Tayo Ph.D.

Written by

Physicist, Data Science Educator, Writer. Interests: Data Science, Machine Learning, AI, Python & R, Predictive Analytics, Materials Sciences, Biophysics

Towards AI

Towards AI is the world’s leading multidisciplinary science publication. Towards AI publishes the best of tech, science, and engineering. Read by thought-leaders and decision-makers around the world.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app