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
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?
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?
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;
3. Is Aristotle right aboutΒ quality?
β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?
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
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