Concept guide · Foundations
What is the difference between classification and regression?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Foundations → Prediction targets
Interview format
Foundations
Question
ML-005
Start with the idea
In simple terms
Classification chooses among categories or estimates the probability of a category. Regression estimates a number whose magnitude has meaning.
Make it concrete
Predicting whether a customer will churn is classification. Predicting how much revenue that customer will generate next month is regression.
Build the answer
How to reason about it
- 1Identify what the business or system needs to decide.
- 2Inspect whether the target is a category/probability or a meaningful numeric quantity.
- 3Choose losses and metrics that match that target and decision.
Go one level deeper
The technical explanation
The distinction comes from the target and the decision, not from whether a model outputs a number. A classifier may output a probability such as 0.82, but that number represents confidence in a class and is later thresholded or ranked. A regression model outputs a numeric quantity directly. The target type influences the loss, metrics, calibration, and how an error should be interpreted.
Mental model
The target determines the learning problem: category/probability versus numeric quantity.
Say this in the interview
Classification predicts a category or a probability of a category. Regression predicts a numeric quantity where differences between values have meaning. A probability-producing classifier may output a number, but its job is still classification because the number is used to rank or threshold classes. The choice affects the target, loss, metrics, and how errors are interpreted.
Keep preparing