Lab / Loss Function Explorer
L

Loss Function Explorer

Compare loss functions interactively. Drag predictions to see how MSE, cross-entropy, Huber, and more respond.

|
Click and drag to explore loss values

Controls

1.0
1.0

Properties

FunctionSym.RobustDiff.TypeGradient
MSEYesNoYesRegLinear (grows with error)
MAEYesYesNoRegConstant (always +/-1)
HuberYesYesYesRegLinear near 0, constant for large errors
Formulas Reference
MSE: (y - ŷ)²
MAE: |y - ŷ|
Huber: ½a² if a≤δ, else δ(a-½δ)
BCE: -[y·log(p)+(1-y)·log(1-p)]
CCE: -y·log(p)
Hinge: max(0, 1-y·ŷ)
Focal: -α(1-p)ʸ·log(p)
Log-Cosh: log(cosh(y-ŷ))

Drag the vertical line or data points to explore. All computation runs entirely in your browser.