Breaking Down Machine Learning: Supervised vs. Unsupervised Explained

I just began taking Andrew Ng’s Machine Learning Specialization on Coursera, and I’ve resolved to write about my learning process in a series of articles — explaining each concept in layman’s terms as I progress.
For context, this course is taught by Andrew Ng — a famous personality in AI education and co-founder of Coursera — and is widely known for making complex ML concepts beginner-friendly and practical.
Here’s my first article, where I’ll cover what machine learning really is, the difference between supervised and unsupervised learning, and a quick look at regression, classification, and clustering.
What is Machine Learning?
Machine learning is a branch of artificial intelligence where computer systems learn and improve automatically from data, without needing to be explicitly programmed.
Instead of being told exactly what to do step by step, these systems recognize patterns in large datasets and get better as they process more information — much like gaining experience over time.
Importance of Machine Learning.
We’re generating more data than ever before, and machine learning makes it possible to analyze this massive information flow and turn it into real value. It powers essential business functions like fraud detection, spotting security threats, personalized recommendations, chatbots for customer service, transcription, translation, and deep data analysis.
Beyond business, machine learning drives the innovations of tomorrow — from self-driving cars, drones, and advanced robotics to augmented and virtual reality. In short, it’s helping humans achieve things with computers that were once unimaginable.
How does Machine Learning work?
Machine learning works by training an algorithm on data so it can make accurate predictions or identify patterns. During training, the algorithm adjusts itself to fit the data — a process called “fitting.” If the predictions fails, the algorithm is refined and trained again and again until it produces the correct results.
When the training data is high quality, providing more examples generally makes the model more accurate. In simple terms, the algorithm “learns” from data by finding relationships — whether that’s a line, a group (cluster), or some other pattern — and then uses this knowledge to make predictions on new data.
Types of Machine Learning
1. Supervised Learning:-
Supervised learning is a type of machine learning where a model is trained on labeled data — meaning every input already has the correct answer. The model learns by comparing its predictions to these known answers and adjusting itself to reduce mistakes. The goal is to make accurate predictions on new, unseen data.
For example, if a model is trained to recognize handwritten digits, it uses what it learned from labeled examples to correctly identify numbers it hasn’t seen before.
Supervised learning is mainly used in two forms: classification (predicting categories, like whether an image is a cat or a dog) and regression (predicting numbers, like house prices). In both cases, the model improves by studying examples and learning the key patterns that separate one label from another.
Supervised learning can be applied to two main types of problems:
Classification: Where the output is a categorical variable (e.g., spam vs. non-spam emails, yes vs. no).
Regression: Where the output is a continuous variable (e.g., predicting house prices, stock prices)
(Note I’ll talk more on Classification and Regression in upcoming articles )
2. Unsupervised learning:-
Unsupervised learning is a way for machines to learn from data without being told what’s right or wrong. In supervised learning, we give examples with clear labels — like “this is a cat” or “this is a dog.” In unsupervised learning, there are no labels at all. The algorithm just gets a pile of data and has to figure out patterns on its own, without any hints.
This is really useful when you have lots of raw information but no easy way to organize it. The computer looks for anything interesting — groups, similarities, or even strange outliers that don’t fit in.
Unsupervised learning mainly uses 3 types of algorithms:-
Clustering — grouping similar things together. For example, an online store could automatically sort customers into groups based on their shopping habits, even without knowing who’s a “bargain hunter” or who’s a “premium buyer.”
Anomaly detection — spotting things that stand out as unusual. This is often used for detecting credit card fraud or finding faulty products on an assembly line.
Dimensionality reduction means cutting down the number of features in a dataset while keeping the important information. For example, reducing 100 student traits to just height and grades makes the data easier to analyze or visualize.
3. Reinforcement Learning
Reinforcement learning is a type of machine learning where an agent learns by interacting with an environment and receiving feedback in the form of rewards or penalties. Instead of being given labeled examples (like supervised learning) or finding hidden patterns (like unsupervised learning), the agent discovers the best actions to take through trial and error. Over time, it learns a strategy — called a policy — that maximizes rewards. For example, think of training a robot to walk: at first it stumbles, but with every successful step, it “earns” a reward, encouraging it to walk more steadily in the future.
This is just the beginning of my journey through Andrew Ng’s Machine Learning Specialization on Coursera! I’ll be sharing bite-sized explanations of every concept I learn. If you’re curious about machine learning (or learning alongside me), follow along for the next article where we’ll explore supervised learning in depth with real-world examples.
Subscribe to my newsletter
Read articles from Agrim Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
