You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in #14300 (comment) it might be useful to add the d2_deviance_score that is a generalization of r2_score to non normal error distributions. In the same way as mean_tweedie_deviance (introduced #14263) is a generalization of mean_squared_error .
This generalized R2 score is sometimes called "McFadden's likelihood ratio index". Note that the ratio of 2 deviances (of exactly same family) is equivalent to the likelihood ratio.
The "D^2" score is actually a kind of meta-scoring function that works for any non-negative loss function as D2 = 1 - loss(y_true, y_pred) / loss(y_true, z) with z=mean(y_true). (For losses that are consistent for other functionals than the mean, e.g. quantile losses, one could generalize z accordingly, e.g. z=quantile(y_true)). The meaning is always "percentage of loss x explained".
Example: If we introduce the Bernoulli/Binomial deviance (=2* log-loss + constant), we could define d2_binom_score as percentage of Binomial deviance explained.
What is then the better approach:
Define for each loss_x a corresponding d2_x_score (where is makes sense)?
Define a meta-score like d2_score(y_true, y_pred, loss=...)?
Activity
lorentzenchr commentedon Jan 4, 2020
This generalized R2 score is sometimes called "McFadden's likelihood ratio index". Note that the ratio of 2 deviances (of exactly same family) is equivalent to the likelihood ratio.
lorentzenchr commentedon May 10, 2020
The "D^2" score is actually a kind of meta-scoring function that works for any non-negative loss function as
D2 = 1 - loss(y_true, y_pred) / loss(y_true, z)withz=mean(y_true). (For losses that are consistent for other functionals than the mean, e.g. quantile losses, one could generalizezaccordingly, e.g.z=quantile(y_true)). The meaning is always "percentage of loss x explained".Example: If we introduce the Bernoulli/Binomial deviance (=2* log-loss + constant), we could define
d2_binom_scoreas percentage of Binomial deviance explained.What is then the better approach:
loss_xa correspondingd2_x_score(where is makes sense)?d2_score(y_true, y_pred, loss=...)?adrinjalali commentedon Aug 22, 2021
Removing the milestone, #17036 will resolve this, in this release or a next one ;)