-
-
Notifications
You must be signed in to change notification settings - Fork 26k
ENH Add Multiclass Brier Score Loss #22046
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
Merged
lorentzenchr
merged 71 commits into
scikit-learn:main
from
ogrisel:multiclass_brier_score_loss
Mar 20, 2025
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
f630718
add multi-class support
e08d4f4
fix swapped y_true y_prob
eff8854
fix docstring
d864395
fix docstring
32ab60a
fix variable name spelling
6e73c0d
add tests
7ce3f85
merge upstream
9cd4247
import re
1369945
fix docstring
a183d06
fix linting
08688d3
fix linting
4f8a5f2
remove unused import
7b51433
add multiclass_brier_score_loss
d5c90bf
add tests
2243828
fix docstring
9893101
Merge remote-tracking branch 'upstream/master' into multiclass_brier_…
3e4465f
use f-strings
eafda42
fix tests
038abf7
fix error message
838f827
fix docstring
5ef41c7
fix linting
4fb4c4f
Update sklearn/metrics/_classification.py
aggvarun01 3260bf3
Apply suggestions from code review
aggvarun01 86d793e
split tests
411ec1a
add private function
f84493c
add warning for labels
79f014d
Merge remote-tracking branch 'origin/main' into multiclass_brier_scor…
ogrisel 50f50ef
Fix multiclass_brier_score_loss docstring sections order
ogrisel 884c434
Add entry in the changelog
ogrisel cdc4cc9
Update multiclass calibration example
ogrisel 9bd4ad1
Register a new scorer
ogrisel bae82ee
Merge remote-tracking branch 'origin/main' into multiclass_brier_scor…
ogrisel 28c313f
Merge remote-tracking branch 'upstream/main' into multiclass_brier_sc…
antoinebaker 478c568
fix doctest and matched errors
antoinebaker 2ee8fd7
changelog
antoinebaker b6e8344
fix changelog
antoinebaker da9e8c6
Merge remote-tracking branch 'upstream/main' into multiclass_brier_sc…
antoinebaker b60cb3b
add normalization keyword
antoinebaker 2754db7
Merge remote-tracking branch 'upstream/main' into multiclass_brier_sc…
antoinebaker dcde0d4
document normalize
antoinebaker a0baefb
add scale_by_half
antoinebaker 3311ca8
update doc
antoinebaker bfa89dd
changelog
antoinebaker 4f00c63
Merge branch 'main' into multiclass_brier_score_loss
antoinebaker 1a88de7
improve test coverage
antoinebaker 42c567c
Apply suggestions from code review
antoinebaker eb446b8
rewrap
antoinebaker 5c2cf3d
changelog
antoinebaker a764d1f
add labels
antoinebaker 63548bf
Update sklearn/metrics/tests/test_classification.py
antoinebaker b2d2ba9
formatting
antoinebaker 46dec65
Update sklearn/metrics/tests/test_common.py
antoinebaker 6fa3b5d
Apply suggestions from code review
antoinebaker c91aef1
versionadded
antoinebaker b89d077
more explicit warning
antoinebaker c05e891
incomplete labels
antoinebaker a65b9c3
Merge remote-tracking branch 'upstream/main' into multiclass_brier_sc…
antoinebaker 1054b83
remove log_loss mention
antoinebaker c163b6a
fix doctest
antoinebaker 01fa561
update test_common
antoinebaker e45a660
Merge remote-tracking branch 'upstream/main' into multiclass_brier_sc…
antoinebaker 4e27bbf
return float
antoinebaker a5b448b
changelog
antoinebaker ef0bbe8
Merge branch 'main' into multiclass_brier_score_loss
antoinebaker 3595b8e
Apply suggestions from code review
antoinebaker 58e5f18
doc
antoinebaker 6de5e13
symmetry tests
antoinebaker 653d4ae
test y_proba with two columns
antoinebaker 242ee3e
Merge branch 'main' into multiclass_brier_score_loss
antoinebaker 6359c7d
Merge branch 'main' into multiclass_brier_score_loss
antoinebaker e3e406c
Apply suggestions from code review
antoinebaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
doc/whats_new/upcoming_changes/sklearn.metrics/22046.feature.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- :func:`metrics.brier_score_loss` implements the Brier score for multiclass | ||
classification problems and adds a `scale_by_half` argument. This metric is | ||
notably useful to assess both sharpness and calibration of probabilistic | ||
classifiers. See the docstrings for more details. By | ||
:user:`Varun Aggarwal <aggvarun01>`, :user:`Olivier Grisel <ogrisel>` and | ||
:user:`Antoine Baker <antoinebaker>`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- :func:`metrics.log_loss` now raises a `ValueError` if values of `y_true` | ||
are missing in `labels`. By :user:`Varun Aggarwal <aggvarun01>`, | ||
:user:`Olivier Grisel <ogrisel>` and :user:`Antoine Baker <antoinebaker>`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.