What is Machine Learning?

Aspiring machine learning engineer
What came to your mind the first time you heard the term "machine learning"? Did you picture a robot studying with the goal of outsmarting humans? If so, you weren't entirely wrong. Machine learning is the art of teaching a computer to perform tasks without explicitly programming it.
Consider this: how does YouTube know which videos to recommend based on your viewing history? Or why does Google show you phone ads right after you browse for a new phone? That’s all powered by machine learning.
How does a machine learn?
We can’t just command a machine to start learning. As Tom Mitchell, an American computer scientist, famously defined it:
A machine is said to learn from experience (E) with respect to some class of tasks (T) and performance measure (P), if its performance on task T as measured by P improves with experience E.
But what does that really mean?
Imagine a child learning to differentiate between cats and dogs. They start with a picture book filled with images of both animals. Their teacher points out which is a cat and which is a dog, and over time, the child begins to notice the differences, like the shape of the ears or the size of the body. Eventually, they can correctly identify a cat or a dog, even in a new picture they've never seen before.
So, in this example:
The task (T) is identifying whether an image shows a cat or a dog.
The experience (E) is the number of times the child is shown images and taught which animal is which.
The performance measure (P) could be the number of correct identifications the child makes, maybe rewarded with sweets or praise.
Just like this child, a machine learns through exposure to data (experience) and improves its performance based on feedback. For instance, YouTube’s recommendation algorithm learns from your viewing history (experience) to suggest new videos you might like.
Why do we need machine learning?
The phrase, “data is the new oil“ is widely mentioned. With the amount of data generated on a daily basis, there is absolutely no way humans can perform tasks like suggesting a new YouTube video on a large scale. YouTube collects everything from your history to your engagement patterns and this data is what is refined and fed into an algorithm to make the recommendations.
Secondly, machines can discover hidden patterns in data that a human would never be able to discover and this is what enables them to be better at making predictions than human beings in many cases. There are so many use cases for machine learning, such as weather prediction, disease prediction, detecting fraudulent transactions, predicting stock crashes and so on.
Types of Machine Learning
Some machine learning algorithms do not need labeled data to undergo training, while others do. Labeled data refers to data has been assigned a specific label or category. Say you want to predict the prices of houses in your area. You have to feed the algorithm features of existing houses such as the number of rooms, land area, location, and so on, but you also have to give it the price. The algorithm can then learn the relationships between these features and the price which we call the label or target variable. The hidden relationships are then used to predict the prices of houses that are unlabeled (i.e. the prices are not given). This type of machine learning is known as supervised learning.
There are three main classes of machine learning; supervised, unsupervised and reinforcement learning
Supervised Learning
In supervised learning, the model learns from labeled data. This means that for each input, the model is provided with the correct output, allowing it to learn the relationship between inputs and outputs. Think of it as having a teacher who shows you the correct answers while you learn.
Example: Imagine you want to build a model that predicts house prices. You collect a dataset where each house has features like the number of rooms, location, size, and price. The model learns to associate the features with the correct price (label). Later, when you provide the model with new house features (but without the price), it can make an accurate price prediction.
Supervised learning is further divided into two main types:
Regression: Where the model predicts continuous values (like house prices or temperature).
Classification: Where the model predicts discrete categories (like classifying emails as spam or not spam).
Unsupervised Learning
Unlike supervised learning, unsupervised learning works with data that has no labels. The model is not given the correct answers and instead tries to discover patterns and relationships within the data on its own.
Example: Suppose you have a collection of customer data for an online store, including each customer's purchase history, age, and location. With unsupervised learning, you can group these customers into segments based on similar behaviors. This can help with things like personalized marketing or targeted advertising.
The most common unsupervised learning techniques include:
Clustering: Grouping similar data points together (e.g., customer segmentation).
Dimensionality Reduction: Reducing the number of features while retaining essential information (e.g., Principal Component Analysis).
Reinforcement Learning
Reinforcement learning is a bit different. Here, an agent (like a self-driving car or a game-playing robot) learns by interacting with an environment and receiving feedback in the form of rewards or penalties. It’s like training an animal. You reward it for good behavior and correct it for bad behavior.
Example: Consider a game-playing bot learning to master chess. Initially, it may make random moves. But over time, as it wins or loses, it learns which moves lead to victory and which lead to defeat. The ultimate goal in reinforcement learning is to maximize the total reward over time.
Why Understanding These Types Matter
Understanding the different types of machine learning helps you choose the right approach for your problem. If you have labeled data and want to make predictions, supervised learning is your go-to. If your goal is to uncover hidden patterns in unlabeled data, unsupervised learning is the answer. If you are working with a scenario where an agent must learn through trial and error, reinforcement learning is your best bet.
Real-World Applications of Machine Learning
Machine learning is everywhere. Here are a few examples of how these types are applied in real life:
Supervised Learning: Email spam detection, credit card fraud detection, medical diagnosis.
Unsupervised Learning: Customer segmentation, anomaly detection, recommendation systems.
Reinforcement Learning: Self-driving cars, robotic process automation, game-playing bots.
Conclusion
Machine learning is not just a buzzword. It's a transformative technology that powers countless applications around us. Understanding the basics of how machines learn and the different types of learning can help you make sense of this fascinating field.
Thank you for taking your time to read this article. I hope you found it insightful! If you enjoyed it, please consider liking, sharing, or commenting with your thoughts and questions. Your engagement not only supports this work but also helps others discover valuable content.

