question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add quantile loss as metric

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
lorentzenchrcommented, Dec 14, 2020

@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.

1reaction
GaelVaroquauxcommented, Nov 27, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found