Skip to content

Add more D2 scores #20943

Closed

Description

@lorentzenchr

Describe the workflow you want to enable

I'd like to evaluate models by "percentage of reduction in metric X", where X is:

  • LogLoss
  • absolute error
  • pinball loss

As d2_tweedie_score #17036, these are generalizations of the r2_score.

Describe your proposed solution

Add

  • d2_log_loss_score
  • d2_absolute_error_score
  • d2_pinball_loss_score

Describe alternatives you've considered, if relevant

No response

Additional context

See #17036 (comment).

Activity

  1. changhsinlee commented on Dec 3, 2021

    @changhsinlee

    @lorentzenchr I'm thinking about taking a stab at this. I have a two questions about d2_log_loss_score.

    Q1: I can't seem to locate literature that specifically uses log_loss in computation. Any pointers here for reading on how D2 and log_loss are used together? I am not too familiar with D2 overall so anything is welcome. Already checked out the Hastie & Tibshirani reference in the docstring. Also found this paper by Guisan and Zimmermann that has an explanation closer to the "meta-score" explanation in the RFC on eq 1, pg 166.

    Q2, on file structure: Given that Tweedie applies to regression models and d2_tweedie_score goes into sklearn.metrics._regression. In the case of log_loss it is a classification metric (source), does this mean d2_log_loss_score should go under sklearn.metrics._classification? Thanks.

  2. changhsinlee commented on Dec 3, 2021

    @changhsinlee

    Just realized that it's the same as McFadden's R^2 which was much easier to search than D^2. Thanks for the doc!

    e.g.

    I think I'll take on d2_log_loss_score. Thanks. Do I need to wait for progress on #21718 ?

  3. lorentzenchr commented on Dec 3, 2021

    @lorentzenchr
    MemberAuthor

    @changhsinlee A McFadden R2 version for log loss is not controversial, IMO, so go ahead. A PR is most welcome.

  4. ohadmich commented on Jan 2, 2022

    @ohadmich
    Contributor

    @lorentzenchr I started working on implementing d2_absolute_error_score, I'll add a PR when it's ready for review.

  5. MaxwellLZH commented on May 17, 2022

    @MaxwellLZH
    Contributor

    Working on d2_log_loss_score

  6. OmarManzoor commented on Jan 11, 2023

    @OmarManzoor
    Contributor

    Hi @MaxwellLZH
    I just wanted to confirm that are you still working on d2_log_loss_score?

  7. MaxwellLZH commented on Jan 11, 2023

    @MaxwellLZH
    Contributor

    Hi @MaxwellLZH I just wanted to confirm that are you still working on d2_log_loss_score?

    Hi @OmarManzoor, I'm not working on it at the moment, you can go ahead :)

  8. OmarManzoor commented on Jan 11, 2023

    @OmarManzoor
    Contributor

    Hi @MaxwellLZH I just wanted to confirm that are you still working on d2_log_loss_score?

    Hi @OmarManzoor, I'm not working on it at the moment, you can go ahead :)

    Thank you for the clarification.

  9. OmarManzoor commented on Jan 12, 2023

    @OmarManzoor
    Contributor

    Hi @lorentzenchr

    Is the d2_log_loss_score the D^2 version for the mean_squared_log_error?

  10. lorentzenchr commented on Jan 12, 2023

    @lorentzenchr
    MemberAuthor

    @OmarManzoor No, d2_log_loss_score is for log_loss and not yet implemented.

  11. OmarManzoor commented on Jan 12, 2023

    @OmarManzoor
    Contributor

    @OmarManzoor No, d2_log_loss_score is for log_loss and not yet implemented.

    I see. Could you kindly provide some reference to the specification of log_loss so that I can get some guidance on how to implement it? We have a log_loss defined in classification but this should be a bit different than that?

  12. lorentzenchr commented on May 2, 2024

    @lorentzenchr
    MemberAuthor

    I would still add a D2 Brier score and then we can finally close here.

  13. OmarManzoor commented on May 2, 2024

    @OmarManzoor
    Contributor

    I would still add a D2 Brier score and then we can finally close here.

    Since the approach for this seems similar, would it be okay if I work on this too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions