Skip to content

fbeta_score does not accept beta=0 #13224

@wdevazelhes

Description

@wdevazelhes

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):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EasyWell-defined and straightforward way to resolveSprintgood first issueEasy with clear instructions to resolvehelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions