What is the difference between regression and classification?

Updated May 17, 2026

Short answer

Regression predicts continuous values; classification predicts discrete labels.

Deep explanation

Regression outputs numeric values like price or temperature, while classification assigns categories like spam/not spam. Different loss functions and evaluation metrics are used.

Real-world example

Regression: predicting salary; Classification: detecting fraud.

Common mistakes

  • Using regression metrics for classification problems.

Follow-up questions

  • Can classification output probabilities?
  • Which is harder: regression or classification?

More Supervised Learning interview questions

View all →