Pinball loss for quantile regression.
Read more in the User Guide.
Ground truth (correct) target values.
Estimated target values.
Sample weights.
This loss is equivalent to Mean absolute error when alpha=0.5
, alpha=0.95
is minimized by estimators of the 95th percentile.
Defines aggregating of multiple output values. Array-like value defines weights used to average errors.
Returns a full set of errors in case of multioutput input.
Errors of all outputs are averaged with uniform weight.
If multioutput is ‘raw_values’, then mean absolute error is returned for each output separately. If multioutput is ‘uniform_average’ or an ndarray of weights, then the weighted average of all output errors is returned.
The pinball loss output is a non-negative floating point. The best value is 0.0.
Examples
>>> from sklearn.metrics import mean_pinball_loss >>> y_true = [1, 2, 3] >>> mean_pinball_loss(y_true, [0, 2, 3], alpha=0.1) 0.03... >>> mean_pinball_loss(y_true, [1, 2, 4], alpha=0.1) 0.3... >>> mean_pinball_loss(y_true, [0, 2, 3], alpha=0.9) 0.3... >>> mean_pinball_loss(y_true, [1, 2, 4], alpha=0.9) 0.03... >>> mean_pinball_loss(y_true, y_true, alpha=0.1) 0.0 >>> mean_pinball_loss(y_true, y_true, alpha=0.9) 0.0
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4