Regression vs classification: the one distinction that unlocks half of ML
Take a picture of a dog.
🐶 Question 1: "How old is this dog?"
- 8 months
- 2.5 years
- 10 years
The answer is a number. Even if the model predicts 7 years instead of 8, it's technically wrong, but it's still close. ➡️ That's Regression.
🐕 Question 2: "What breed is this dog?"
- Labrador
- Poodle
- Husky
Now the answer is a label, not a number. The model can be 95% confident under the hood, but the final output drops into one specific category. ➡️ That's Classification.
Once this clicked, I started seeing the split everywhere.
✅ Predict a house price → Regression
✅ Predict if an email is spam → Classification
✅ Predict tomorrow's temperature → Regression
✅ Detect fraud → Classification
The most interesting part? You can frame the exact same business problem either way.
- Will a customer cancel? → Classification
- How many days until they cancel? → Regression
Same raw data. Different question. Different model.