Lesson 12 of 13 7 min · 131 words
Classification vs. regression
Predicting a category versus predicting a continuous number.
In classification the target is a category: spam / not spam, digit 0–9, disease A / B / C. The model outputs a class (often with a probability for each class). Binary classification has two classes; multiclass has more.
In regression the target is a continuous number: a price, a temperature, a time until failure. The model outputs a real value and is judged by how far off it is (RMSE, MAE).
The distinction drives the choice of loss and metrics: squared error for regression, cross-entropy for classification; RMSE and R² versus accuracy, precision and recall.
Formula to remember
Dataset
A supervised dataset: n examples, each a feature vector with its label.
Quick check · +5 XP