Mean Tweedie deviance regression loss.
Read more in the User Guide.
Ground truth (correct) target values.
Estimated target values.
Sample weights.
Tweedie power parameter. Either power <= 0 or power >= 1.
The higher p the less weight is given to extreme deviations between true and predicted targets.
A non-negative floating point value (the best value is 0.0).
>>> from sklearn.metrics import mean_tweedie_deviance >>> y_true = [2, 0, 1, 4] >>> y_pred = [0.5, 0.5, 2., 2.] >>> mean_tweedie_deviance(y_true, y_pred, power=1) 1.4260...
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.metrics.mean_tweedie_deviance.html