-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Register scorer objects for d2_log_loss_score and d2_brier_score
#32356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register scorer objects for d2_log_loss_score and d2_brier_score
#32356
Conversation
|
@ogrisel I am looking into this if it's okay |
|
Let me add a changelog entry to document the changes. |
|
@OmarManzoor I am converting to draft because after profiling the new code I realized that most computation is spent in multiple redundant calls to |
|
I think this is ready for review. I did a bit of local profiling and the redundant computation has gone aways as expected, and I see a ~1.2x to ~1.5x speed-up compared to main. Let me redo a quick benchmark for |
|
Performance improvement over 1.7 confirmed and new changelog for the performance improvement pushed. I think we could easily do a follow-up PR to add array API support to those metrics, but I think this PR is ready as it is. |
OmarManzoor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thank you @ogrisel
virchan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks, @ogrisel!
@OmarManzoor, could we merge this?
I also tried to register those metrics in the common tests, but there are 2 failures to investigate in
sklearn/metrics/tests/test_common.py.EDIT: I also renamed
THRESHOLDED_METRICStoCONTINOUS_CLASSIFICATION_METRICS(and similar) in the test code because I found the original names very confusing, since those metrics accept unthresholded predictions contrary to other classification metrics.