Join thousands of AI enthusiasts and experts at the Learn AI Community.

Publication

Latest

4 Common Pitfalls When Building Machine Learning Model

Last Updated on July 3, 2022 by Editorial Team

Author(s): Gencay I.

Originally published on Towards AI the World’s Leading AI and Technology News and Media Company. If you are building an AI-related product or service, we invite you to consider becoming an AI sponsor. At Towards AI, we help scale AI and technology startups. Let us help you unleash your technology to the masses.

Most Common Issues When Building a Machine Learning Model

Photo by charlesdeluvio on Unsplash
Contents
· Introduction
1. Is your source up to date?
Solution
2. Not Enough Data?
Solution
3. Is Aristotle right about quality?
Solution
4. Can your model be perfect?
Solution
· Conclusion

Introduction

When building a Machine Learning Model for your company, for your portfolio, or for fun, there are some steps to take. And there are some other things you should avoid to increase your model accuracy. In this article, I try to warn you about 4 Common Pitfalls, when building a machine learning model. Although tons of cautions, you should take, while applying Machine Learning Model, when you avoid doing these steps, your model will be okay.

1. Is your source up to date?

Photo by Markus Winkler on Unsplash

These days, when building machine learning, it is common to find sources online.

Like in GitHub pages or course materials.

Generally, that is a self-evolving process but sometimes you have to be careful about that.

Sometimes, online documentation can be updated according to the version changes, but if you looked at the codes from outdated documents or Github pages, that could result in you doing the debugging process.

That means, the function name or arguments might change, sometimes even the name of the function can be changed.

Solution

To avoid these problems, I always look at the date of the source I am reading.

After that, check the library version in that article and compare it with the current one.

For example, if you are coding in Python and you are using Scikit Learn, it would be good to check the Scikit-learn release history here.

2. Not Enough Data?

Photo by Markus Spiske on Unsplash

Does More Data Always Better?

Simple but important.

Most of the time more data would be better.

It is not the only way of improving your Machine Learning model’s performance.

Solution

On the other hand, research shows, that more data would be better most of the time.

Sometimes, adding more data may increase the cost, on the other hand, it would increase your model's performance too as shown in Andrew Ng’s graph below;

Reference: Deep Learning AI

3. Is Aristotle right about quality?

Photo by Alex Shute on Unsplash

“Quality is not an act it is a habit.”

Aristotle

Actually, I assume if Aristotle would live in that era, he will be a great Data Scientist.

Data Quality is very important when you build a Machine Learning model.

Especially, if your model is used in production.

However, sometimes, things can go out of your control.

Especially when your model is in production.

Solution

If you want to build that habit, you should check your incoming data frequently to avoid bad incoming data.

Moreover, setting limits to your incoming data would prevent bad incoming data and that will guard your model efficiency.

4. Can your model be perfect?

Photo by Vitolda Klein on Unsplash

Let’s be straightforward, no.

Chasing perfection can be a great thing but not in Machine Learning.

In machine learning it might be a motivation killer for you and also would cause overfitting.

What does overfitting mean?

Overfitting means simply your model is way perfect, so it is too good to be true.

“Perfection is the enemy of progress.”

Winston Churchill

Solution

To avoid overfitting, one thing to do is to simplify your model.

By dimension reduction or feature engineering, you can easily be simplifying your model and overcome overfitting.

Conclusion

Photo by Robynne Hu on Unsplash

The era we are in is really interesting.

Daily improvements change the way of living of humanity.

Machine Learning and its applications are really important in that aspect.

Let's look at the Real-life machine learning applications quickly;

  • Face Recognition- These days even our mobile phones use this tech.
  • Speech Recognition- Siri is a famous example.
  • Recommender System- Mostly known on Netflix, you may like this film too.

And machine Learning comes into almost every cutting-edge business space;

  • Healthcare– Detecting Tumors
  • Finance– Predicting Stock Prices
  • Law– Consumer Analysis

And many more.

So independent from your business space, in my opinion, either you across with Machine Learning or you will be in the near future and one step forward;

Machine learning is the last invention that humanity will ever need to make.” Nick Bostrom

Thanks for reading my article.


4 Common Pitfalls When Building Machine Learning Model was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

Join thousands of data leaders on the AI newsletter. It’s free, we don’t spam, and we never share your email address. Keep up to date with the latest work in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI

Feedback ↓