Supervised vs Unsupervised Learning
Machine learning algorithms are broadly divided into two families based on one simple question - does the training data come with labels or not? This distinction shapes everything from the algorithm you choose to the way you evaluate results.
Supervised Learning
In supervised learning, the model learns from labeled data - every training example has a known input and a known output. The goal is to learn a mapping from inputs to outputs that generalizes well to new, unseen data. Regression and classification (like the Linear Regression and KNN Classifier you've already covered) both fall under this category.
Unsupervised Learning
In unsupervised learning, there are no labels at all - only the input data. The model's job is to find hidden structure, patterns or groupings on its own. Clustering and dimensionality reduction, which you're about to explore in depth, are the two major branches of unsupervised learning.
Key Differences
| Supervised Learning | Unsupervised Learning | |
|---|---|---|
| Data | Labeled (input + output) | Unlabeled (input only) |
| Goal | Predict an outcome | Discover structure or patterns |
| Examples | Regression, Classification | Clustering, Dimensionality Reduction |
| Evaluation | Accuracy, RMSE, F1-score, etc. | Silhouette score, inertia, visual inspection |
A Quick Analogy
Think of supervised learning as studying with an answer key - you know exactly what the correct answer looks like for each question. Unsupervised learning is more like sorting a box of mixed items into groups without being told what the categories are - you have to figure out the natural groupings yourself.
Coming Up Next
Since clustering is the most common unsupervised technique, the next step is to understand distance measures - the mathematical backbone that determines how "similar" two data points are.