skip to content
Victor Guerra

Notes / Generalization & Model Fitting

Classification vs Regression

Updated Sep 10, 20261 min read
Table of Contents
ClassificationRegression
Outputdiscrete label (finite classes)continuous value
Goalwhich category?what numeric value?
Losscross-entropy, hingeMSE, MAE
Metricsaccuracy, F1, AUCRMSE, R², MAE

Measuring confidence

  • Classificationmax(softmax) as confidence; entropy of the output (lower → more confident); MC dropout (dropout at inference to estimate uncertainty).
  • Regressionconfidence/prediction intervals (the range the true value likely falls in).

Converting between them

Classification → regression: predict a continuous score + threshold (sigmoid → threshold at 0.5 for binary; regress toward 0/1 targets, argmax for multi-class). Useful when you want uncertainty estimates, regression-based models, or to combine losses (multi-task). Risk: regression may ignore class boundaries → poor accuracy.

Regression → classification: bin the continuous output into buckets (e.g. age → 0–18/19–35/…), turning it into ordinal/multi-class. Useful when exact values are noisy/irrelevant, you care about ranges, or to handle outliers/imbalance. Risk: discretization loses information/resolution, and ordinal ordering can be lost in standard classification.


Related: loss-functions, logistic-regression, evaluation-metrics, class-imbalance