Quantile loss, also known as the pinball loss
Quantile loss, also known as the pinball loss, is a loss function commonly used in quantile regression problems, where the goal is not to predict a single value but rather to predict an interval that contains the true value with a certain probability.
Quantile Loss measures the error in quantile regression, which predicts a certain quantile (e.g., median, 25th percentile, 75th percentile) rather than a single value. It penalizes over-predictions and under-predictions differently based on the specified quantile.
For a given quantile q (between 0 and 1), the quantile loss of an individual prediction is defined as: L(y, f(x)) = q * max(y - f(x), 0) + (1 - q) * max(f(x) - y, 0), where y is the true value, and f(x) is the predicted value.
This formula captures the asymmetric nature of the quantile loss function. Over-predictions are penalized proportionally to (1 - q), while under-predictions are penalized proportionally to q.
The quantile loss function is commonly used in quantile regression, which is used when the objective is to predict an interval instead of a single point. This can provide more robust predictions when the data has outliers or when the uncertainty of the prediction is important.
Like the Mean Absolute Error (MAE), the quantile loss is robust to outliers because it does not square the errors.
However, the quantile loss function introduces a quantile hyperparameter that must be chosen carefully. Different values of the quantile will give different predictions, and there is no one-size-fits-all choice.
Quantile loss and quantile regression are often used in areas such as finance, where risk estimation is important, and in weather forecasting, where predicting a range of possible outcomes is more informative than predicting a single point.