Supervised vs unsupervised learning
Model answer
The difference is whether the training data has labels.
Supervised learning trains on examples with known answers (labels) and learns to predict them for new inputs. Classification predicts a category, such as spam or not spam. Regression predicts a number, such as a house price. Typical algorithms are linear and logistic regression, decision trees and neural networks. You evaluate it by comparing predictions with the true labels.
Unsupervised learning has no labels. The model looks for structure in the data on its own. Clustering groups similar items, such as customer segments. Dimensionality reduction (PCA) compresses features, and anomaly detection finds unusual points. Evaluation is harder because there is no single right answer.
Supervised learning needs labeled data, which is often expensive. Between the two sit semi-supervised and self-supervised learning, where models learn from mostly unlabeled data.
Key points
- Supervised uses labeled data to predict a target
- Classification predicts categories, regression predicts numbers
- Unsupervised finds structure without labels: clustering, dimensionality reduction
- Labels are costly; self-supervised learning reduces that need
Likely follow-ups
- How would you evaluate a clustering result?
- Where does reinforcement learning fit?
Common mistakes
- Calling clustering a classification task
- Forgetting that supervised learning needs good labels