Skip to content
ML Academy

Introduced on day 16

Pinball loss (quantile loss)

An asymmetric absolute loss at quantile level q that weights under-forecasts by q and over-forecasts by 1 - q; its minimizer is the q-quantile.

In detail

For level q, loss = q x (y - yhat) if y >= yhat, else (1 - q) x (yhat - y). With cost c_u per unit under-forecast and c_o per unit over-forecast, cost equals (c_u + c_o) times the pinball loss at q = c_u / (c_u + c_o), which is why a cost-optimal point forecast is a quantile and not the mean. Day 26 uses it for probabilistic forecasts.