Add quantile loss as metric
See original GitHub issueDescribe the workflow you want to enable
I’d like to evaluate and compare the predictive performance of (conditional) quantiles as predicted by GradientBoostingRegressor(loss='quantile', alpha=0.9)
for example.
Describe your proposed solution
Implement a new metric quantile_loss(y_true, y_pred, alpha=0.5)
, Eq. (24) of https://arxiv.org/pdf/0912.0902.pdf.
This is the same loss as in Koenker’s book “Quantile Regression” and in: https://github.com/scikit-learn/scikit-learn/blob/ad3c28818220a4ec9a40b3b674adcdb676a419ea/sklearn/ensemble/_gb_losses.py#L461-L467
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
Blog: Quantile loss function for machine learning
The quantile regression loss function A quantile is the value below which a fraction of observations in a group falls. For example, a...
Read more >Prediction Intervals in Forecasting: Quantile Loss Function
As the name suggests, the quantile regression loss function is applied to predict quantiles. A quantile is the value below which a fraction...
Read more >Evaluating Predictor Accuracy - Amazon Forecast
The Weighted Quantile Loss (wQL) metric measures the accuracy of a model at a specified quantile. It is particularly useful when there are...
Read more >Quantile regression analysis: DataRobot docs
The Quantile Loss, sometimes called "pinball loss," is a metric that can be used to compare performance of quantile-optimized regression models.
Read more >Which metric to use to evaluate Quantile Regression?
(Then you add up the values for each index i to get a loss for the entire regression, same as you would for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ogrisel I’m fine with calling it
pinball_loss
, though I don’t know who has begun to call it so, this is from 2006. The term “asymmetric piecewise linear, strictly consistent scoring function for the quantile” would also nail it down😏Indeed, there are infinitely many strictly consistent scoring functions of the quantile, all having the form, see paper cited above: S(y, x) = (1_(x ≥ y) − α) (g(x) − g(y)) and g(x) a strictly increasing function.
I know, you only googled, but I’m not that convinced of arxiv:2011.09588.
Note that my comment probably does not rule out the use of the alpha-quantile loss as a metric in GridSearchCV, because surrogate losses can be useful to compare models close enough. I would worry when using it to evaluate a model before putting it in production.