Okay, you've learned that machine learning allows systems to learn patterns from data without being explicitly programmed for every single rule. But how exactly do these systems learn? It turns out there isn't just one way. Machine learning algorithms are often categorized based on the type of learning task they perform and the nature of the data they learn from. Think of these categories as different teaching strategies for our learning machines.
The three most common categories you'll encounter are:
Let's look at each one.
Imagine you're teaching a child to identify different fruits. You show them an apple and say "apple," show them a banana and say "banana," and so on. You provide both the example (the fruit image) and the correct answer (the fruit name). This is the essence of supervised learning.
In supervised learning, the machine learning algorithm is trained on a dataset where each data point includes input features and the corresponding correct output or "label." The goal is for the algorithm to learn a mapping function that can predict the output label for new, unseen input features. It's "supervised" because the presence of correct labels guides the learning process, much like a teacher supervises a student.
There are two main types of supervised learning problems:
Basic flow of Supervised Learning: The algorithm learns from labeled data to create a model capable of predicting labels for new, unlabeled data.
Most practical machine learning applications today use supervised learning because having labeled data often leads to more accurate predictions for specific tasks. Chapters 3 and 4 will look deeper into regression and classification techniques.
Now, imagine giving that same child a big box of mixed Lego bricks without any instructions or labels. The child might start sorting them based on color, shape, or size, discovering natural groupings within the bricks. This is similar to unsupervised learning.
In unsupervised learning, the algorithm is given input data without any corresponding output labels. The goal is for the algorithm to explore the data and find meaningful structure, patterns, or relationships on its own. It's "unsupervised" because there's no teacher or correct answer key guiding the process.
Common types of unsupervised learning tasks include:
Basic flow of Unsupervised Learning: The algorithm analyzes unlabeled data to uncover hidden patterns or groupings.
Unsupervised learning is often used for exploratory data analysis and can reveal insights you might not have expected. Chapter 5 will introduce a popular clustering algorithm.
Think about how you might train a dog: you tell it to "sit," and if it sits, you give it a treat (reward). If it doesn't, it gets no treat (or perhaps a gentle correction, a penalty). Over time, the dog learns which actions lead to rewards. Reinforcement learning (RL) works on a similar principle.
In RL, an "agent" (the learning algorithm) interacts with an "environment." The agent observes the current state of the environment and chooses an action. Based on this action, the environment transitions to a new state and provides feedback to the agent in the form of a reward (positive) or penalty (negative). The agent's goal is to learn a strategy, called a "policy," that maximizes its cumulative reward over time.
Key components in RL:
The interactive loop in Reinforcement Learning: The agent acts, the environment responds with a new state and feedback, and the agent learns to improve its actions.
RL is particularly suited for problems where decisions need to be made sequentially, and the impact of an action might not be immediately clear. Examples include:
While very powerful, RL is often more complex to implement than supervised or unsupervised learning and is generally covered in more advanced courses.
While these three are the main categories, you might occasionally hear about others:
Understanding these fundamental types of machine learning systems provides a framework for thinking about different ML problems and the approaches used to solve them. As you progress through this course, you'll see examples primarily from supervised and unsupervised learning, which form the foundation for many common applications.
© 2025 ApX Machine Learning