Skip to content
BENIBIX Learn

Classification vs Regression

People often think regression means going backwards, or that it does the same job as classification. Both predict, but the answers differ. Classification picks one of a few named groups, like spam or not spam. Regression gives a number on a scale, like a price. Ask what shape the answer has, and you know which one you need.

AI📈 Machine Learning

Classification (Machine Learning)

Sorting each case into one of a few known groups, like spam or not spam.

Classification is the machine learning task of putting each example into one of a set of groups. The groups are fixed before training, like spam or not spam, or cat, dog or bird. The model learns from labelled examples of each group. For a new example, it picks the group that fits best. It often gives a chance for each group too.

Example
Jack's model looks at photos of fruit and says apple, banana or pear. Each photo gets exactly one of those three answers.
Why it matters
Many real jobs are a choice between known options. Spam, fraud, illness and faults are all classification.
Full entry
AI📈 Machine Learning

Regression (Machine Learning)

Guessing a number from the facts you have. The number might be a price or a time.

Regression is the machine learning task of guessing a number. The number can be any value on a scale, like a price, a temperature or a time. The model learns from examples where the real number is known. For a new example, it gives its best guess of the number. The name is old and has nothing to do with going backwards.

Example
Emma's model reads a flat's size, floor and street, then guesses its monthly rent. For one flat it says 1,450 euros.
Why it matters
Many business questions are how much or how many. Sales, prices, wait times and demand are all regression.
Full entry

In one line

Classification (Machine Learning)
Sorting each case into one of a few known groups, like spam or not spam.
Regression (Machine Learning)
Guessing a number from the facts you have. The number might be a price or a time.