-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
fbeta_score does not accept beta=0 #13224
Copy link
Copy link
Closed
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolveSprintgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted
Description
fbeta_score does not accept beta=0. In this case I agree that we could use precision_score which is the same, but is there a reason why this fbeta_score(... beta=0) would be forbidden ? If not I'd be happy to provide a PR. These are the lines that I would delete (plus I would provide a test):
scikit-learn/sklearn/metrics/classification.py
Lines 1028 to 1029 in 7389dba
| if beta <= 0: | |
| raise ValueError("beta should be >0 in the F-beta score") |
What is more, this case is even mentioned in the documentation ("beta -> 0 considers only precision, beta -> inf only recall)"), so we would reasonably expect it to work ? https://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolveSprintgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted