A real-estate company wants to estimate the sale price of an unsold home as a monetary amount, using past sales.
Compare this with a task that returns one label from a predefined list.
Which use case is best suited to regression?
Use regression to estimate a home's price as an amount. Use classification if the model must directly select a predefined price band. Start with the output the business needs.
Detailed explanation
Spam and normal email are two class labels. Encoding them as 0 and 1 does not change the task to regression.
Object detection identifies objects and where they are. Numeric box coordinates do not make the overall task a price estimation problem.
The prediction target is a monetary amount. Estimating that numeric quantity is a regression task.
Finding groups in unlabeled purchase data is clustering. It has no known sale price to predict.
Check official documentation
Compare the following points with the official documentation.
Read the AWS explanation of model types. For the same fictional home, compare a model that estimates a price of $325,000 with one that directly selects a predefined band of $300,000 to $349,999.
Official references
What to confirm
Estimating $325,000 is regression. Directly selecting a predefined price band is classification, even if the band is encoded as a number.
Key points
- Continuous values
- Categories
- Prediction tasks
Notes
- Environment: Paper exercise with AWS documentation and a fictional home price
- When an application displays price bands, check whether the model itself returns an amount or a band.
Foundation review
Amount and band
If a model estimates the price and a business rule then bins it, the model is doing regression. A model that directly selects a band is doing classification.
Class codes
Codes such as 0 and 1 can represent categories. Their numeric format does not turn them into measured quantities.