Skip to content

Add d2_tweedie_score #15244

Closed
Closed

Description

@rth

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 .

Activity

  1. lorentzenchr commented on Jan 4, 2020

    @lorentzenchr
    Member

    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.

  2. lorentzenchr commented on May 10, 2020

    @lorentzenchr
    Member

    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:

    1. Define for each loss_x a corresponding d2_x_score (where is makes sense)?
    2. Define a meta-score like d2_score(y_true, y_pred, loss=...)?
  3. added this to the 1.0 milestone on Nov 3, 2020
  4. adrinjalali commented on Aug 22, 2021

    @adrinjalali
    Member

    Removing the milestone, #17036 will resolve this, in this release or a next one ;)

  5. removed this from the 1.0 milestone on Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds Decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions