๐ท๏ธClassification vs Regression๐
Both are supervised learning tasks, but they answer different kinds of question. One sorts data into groups; the other predicts a number.
Run a moomz poll: who wins for you?
moomz.com โ 10s, anonymous, free
๐ท๏ธClassification
- โPredicts which category or class an input belongs to
- โOutput is a discrete label, like spam or not spam
- โEvaluated with accuracy, precision and recall
- โExamples: image recognition, disease diagnosis
- โDecision boundaries separate the classes
๐Regression
- โPredicts a continuous numerical value
- โOutput is a number, like a price or temperature
- โEvaluated with error metrics like mean squared error
- โExamples: house price and stock value prediction
- โFits a line or curve through the data
Verdict
Ask what kind of answer you need. If the output is a label or category, use classification; if it is a quantity on a continuous scale, use regression.
Frequently asked
How do I tell which task I have?+
If you predict a category, it is classification; if you predict a number, it is regression.
Is predicting house prices classification or regression?+
Regression, because the price is a continuous numeric value rather than a fixed category.
Can the same algorithm do both?+
Some, like decision trees and neural networks, can be adapted for either classification or regression.
Also in