1

I'm not sure the above sentence is true, but I read it here, here and here that quantile loss function percentile 0.5 is MAE(mean absolute error), Is it true(Yes or No)? and How?

1 Answers1

5

Well mathematically speaking, quantile loss for quantile $\gamma$ is defined as:

$L_{\gamma}(y,y^p) = \sum_{i:y_i<\hat{y}_i}(1-\gamma)|y_i-\hat{y}_i| + \sum_{i:y_i\geq \hat{y}_i}(\gamma)|y_i-\hat{y}_i|$

For $\gamma=0.5$ (median), this becomes:

$L_{0.5}(y,y^p) = \sum_{i:y_i<\hat{y}_i}\frac{1}{2}|y_i-\hat{y}_i| + \sum_{i:y_i\geq \hat{y}_i}\frac{1}{2}|y_i-\hat{y}_i| = \sum\frac{1}{2}|y_i-\hat{y}_i|$

Considering that the MAE is:

$MAE = \frac{1}{n}\sum|y_i-\hat{y}_i|$

the two only differ by a constant, and they are therefore equivalent in terms of optimization.

Davide ND
  • 2,305
  • 8
  • 24