CAB212 · Unit 1: Machine learning foundations
Types of machine learning and the ML workflow
9 practice questions
Key points
- Supervised = labeled data; unsupervised = no labels
- Classification predicts categories; regression predicts numbers
- Reinforcement learning learns from rewards
- Always split data before training
Machine learning builds models that learn patterns from data instead of following hand-written rules.
| Type | Data | Goal | Example |
|---|---|---|---|
| Supervised | Inputs with labels | Predict the label | Spam detection, house price |
| Unsupervised | Inputs only | Find structure | Customer clustering |
| Semi-supervised | Few labels, many unlabeled | Use both | Labeling images cheaply |
| Reinforcement | Rewards from an environment | Learn a policy | Game playing |
Supervised problems split into classification (discrete label) and regression (continuous value).
Workflow: define the problem, collect data, clean and explore, engineer features, split data, train, evaluate, tune, deploy and monitor.
Exam pitfall: predicting a house price is regression, but predicting whether a house sells above a threshold is classification, even with the same data.
Try two questions
Grouping customers by purchase behaviour without predefined groups is:
- Regression onto a numeric target
- Supervised learning with known groups
- Clustering (unsupervised)
- Classification into predefined classes
Show the answer
C. No predefined labels exist, so it is unsupervised clustering.
Predicting whether a house price will exceed Rs 50 lakh (yes/no) from its features is:
- Clustering, because houses are grouped by price
- Reinforcement learning, because a threshold is used
- Classification, because the target is categorical
- Regression, because price is numeric
Show the answer
C. The prediction target is yes/no, so it is classification even though price underlies it.