Give three real-world examples each of supervised and unsupervised learning.
Supervised: spam filtering, house price prediction, loan default prediction (all have known past answers). Unsupervised: customer segmentation, anomaly detection in UPI transactions, topic discovery in news articles (no answers given).
Explain it simply
Supervised learning is learning with an answer key. Unsupervised learning is learning without one.
A shopkeeper who has 5,000 past bills marked "returned" or "kept" can train a model to predict returns for new bills: supervised. The same shopkeeper with 5,000 bills and no marks, asking "which customers behave alike?", is doing unsupervised learning.
Example
SUPERVISED (inputs X and known target y)
1. Gmail spam filter : email text -> spam / not spam
2. Flat price estimate : area, city -> price in rupees
3. Loan default risk : income, history -> will default / will not
UNSUPERVISED (inputs X only)
1. Customer segmentation : cluster shoppers by buying pattern
2. Fraud / anomaly flags : find UPI transactions unlike normal ones
3. Topic discovery : group news articles by themeThe second group has no "correct answer" column. The algorithm finds structure, and a person judges whether the structure is useful.
Reinforcement learning is a third type: an agent learns by trial and reward, such as a game-playing bot.
What to say in the interview
"Supervised learning needs labelled data and predicts a known target, as in spam detection or price prediction. Unsupervised learning has no labels and finds patterns such as clusters or unusual points, as in customer segmentation. The first is judged by metrics against labels, the second needs human judgement or indirect measures."
Common mistakes
- Calling anomaly detection supervised without any labelled anomalies.
- Saying unsupervised learning has no evaluation at all.