Week 1 — Prediction Problems & Data · ~50 min
What machine learning is (and is not)
Free previewWhat you'll learn this week
- Tell supervised learning from unsupervised learning, and classification from regression from clustering
- Name the parts of every prediction problem: observation, feature, label, prediction
- Frame a prediction around a decision, a time of prediction and the cost of errors
- Pick a simple baseline before you train anything
- Inspect a dataset for size, missing data, class balance, provenance and representation
- Spot leakage — the most common way a model looks brilliant in a notebook and fails in real life
- Ship a written experiment plan for one regression and one classification problem
A model is a function you did not write by hand
In Data Analytics II you wrote rules yourself:
def risk_level(delay, completion_rate):
if delay > 25 or completion_rate < 0.75:
return "CRITICAL"
...
You chose the thresholds 25 and 0.75. Machine learning flips this around: you give the computer examples with known answers, and it learns the rule (the numbers inside the function) from the data.
Traditional programming: rules + data -> answers
Machine learning: data + answers -> rules (a model)
That is all "learning" means here: choosing numbers inside a function so that its outputs match known answers as closely as possible. No magic, no understanding — just fitting.
The vocabulary you will use every week
Take a lender in Lagos predicting whether a small-business loan will be repaid.
| Term | Meaning | Example |
|---|---|---|
| Observation | One row — one thing we predict about | One loan application |
| Feature | An input column the model may use | Monthly turnover, years trading, loan amount |
| Label / target | The answer we want to predict | Repaid (1) or defaulted (0) |
| Prediction | The model's output for one observation | 0.83 probability of repayment |
Write these four words on every problem you meet. If you cannot say what one observation is, you are not ready to train.
Supervised vs unsupervised
Supervised learning — you have labels. The model learns the mapping from features to label.
- Regression: the label is a number. How many minutes will this delivery take? What will this flat rent for?
- Classification: the label is a category. Will this loan default? Is this transaction fraud? Is this tumour malignant?
Unsupervised learning — no labels. The model finds structure on its own.
- Clustering: group similar observations. Which customers behave alike? Nobody told the model the "right" groups — so nobody can easily tell you whether its groups are right either.
Quick test — which is which?
- Predict next month's electricity units for a household → regression (a number)
- Decide whether an email is spam → classification (spam / not spam)
- Group 5,000 shop customers into segments for marketing → clustering (no label)
- Predict which of 4 delivery hubs a parcel will be routed to → classification (4 classes)
What ML is not
- Not causation. A model that predicts loan default from the applicant's phone brand has found an association. Changing someone's phone will not make them repay.
- Not a replacement for the question. A perfect model of the wrong target is useless.
- Not proof on its own training data. A model can memorise the examples it saw. We only trust results on data it never saw — that is the theme of this entire course.
Self-check
- In your own words: what is the difference between a feature and a label?
- A hospital wants to group patients by similar symptom patterns without any diagnosis column. Supervised or unsupervised?
- Give one regression and one classification problem from your own work or city.
Sign in to track your progress.