Classification and Regression
Supervised learning splits in two, and the split is about what comes out. A word from a fixed list, or a number that could be anything.
1The question to ask
If the output is a number that could land anywhere in a range — a temperature, a price — it is regression. Regression works on continuous data.
Switch between Classification and Regression. Notice they share a parent — both need labelled data.
Full lineage: AI Models → Learning Based → Machine Learning → Supervised → Classification
2Classification
The data is sorted according to its labels. Think of the grading system at school: students are put into grades on the basis of the marks they got. The output is one of a fixed set of grades — the data need not be continuous.
3Regression
Regression models work on continuous data and predict a continuous value from the input variables — temperature, price, income, age.
Pigeonholes and a tape measure
4Side by side
| Classification | Regression | |
|---|---|---|
| Output | A category from a fixed set | A value from a continuous range |
| Kind of data | Discrete — it need not be continuous | Continuous |
| Target variable | Categorical | Numerical |
| Example | Is this email spam? | What will tomorrow's temperature be? |
| Example | Is this applicant eligible for the loan? | What is this house worth? |
“What will tomorrow’s temperature be?” is regression: a number.
Same weather, same data. The output is what decides, and that is precisely the trap.
5From the board papers
(A) Identifying whether an email is spam. (B) Grouping customers by behaviour. (C) Predicting tomorrow’s temperature. (D) Recognising faces in photos.CBSE board exam 2026
▶Show the answer
(C) Predicting tomorrow’s temperature. A temperature is a continuous value. (A) and (D) put things into categories, so they are classification; (B) forms groups nobody defined, so it is clustering.
▶Show the answer
1. It is a supervised learning model: it is trained on labelled data, and it sorts the data according to those labels.
2. Its output is a category from a fixed set — it works on discrete data, so the data need not be continuous.
(a) predict whether a patient will have a short or long hospital stay; (b) predict the number of days a patient will stay.Class X handbook, Reflection Time
▶Show the answer
(a) Classification. “Short” and “long” are two named categories.
(b) Regression. A number of days is a continuous value.
6Check yourself
The target variable is categorical in which kind of problem?
Which model would you use to predict a continuous valued output?
Predicting whether a customer is eligible for a bank loan or not is:
A real estate agency predicts house selling prices from size, location and number of bedrooms. This is: