Classification vs Regression
Two Kinds of Predictions
Categories vs numbers
Regression predicts a continuous number — like house price, temperature, or stock value. The output can be any real number.
Step 1 of 6: Two Kinds of Predictions
Categories vs numbers
Regression predicts a continuous number — like house price, temperature, or stock value. The output can be any real number.
Step 2 of 6: Regression
Predicting continuous values
Regression fits a line ŷ = 40x + 50. The red lines show residuals — the error for each point. MSE = 296 measures the average squared error. Great fit!
Step 3 of 6: Binary Classification
Yes or no
The sigmoid curve (top) maps Feature 1 to a probability. The vertical boundary (bottom) shows where the decision splits in feature space. Try adjusting the threshold — watch the boundary shift. Yellow-ringed points are misclassified.
Step 4 of 6: Multi-class Classification
More than two categories
Softmax turns raw scores into probabilities across 3 classes. At T=1.0 (default), softmax balances confidence and uncertainty. Click any point to see its class probabilities.
Step 5 of 6: Choosing the Right Loss
MSE vs Cross-Entropy
MSE treats classification like a number-guessing game — it only cares how far the probability is from 1. Cross-entropy (CE) is designed for classification — it measures how surprised the model is by the true label. Drag the slider left to see CE explode while MSE stays mild — that's why CE is the standard loss for classification.
Step 6 of 6: When to Use Which
A decision guide
House Price: This is regression — predict a continuous value. Use a linear output layer and MSE or MAE loss.