Skip to content

DOC fix items in docstring of zero_division #30175

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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions sklearn/metrics/_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,7 @@ def fbeta_score(
predictions and labels are negative.

Notes:

- If set to "warn", this acts like 0, but a warning is also raised.
- If set to `np.nan`, such values will be excluded from the average.

Expand Down Expand Up @@ -1799,11 +1800,13 @@ def precision_recall_fscore_support(

zero_division : {"warn", 0.0, 1.0, np.nan}, default="warn"
Sets the value to return when there is a zero division:
- recall: when there are no positive labels
- precision: when there are no positive predictions
- f-score: both

- recall: when there are no positive labels
- precision: when there are no positive predictions
- f-score: both

Notes:

- If set to "warn", this acts like 0, but a warning is also raised.
- If set to `np.nan`, such values will be excluded from the average.

Expand Down Expand Up @@ -2228,6 +2231,7 @@ def precision_score(
Sets the value to return when there is a zero division.

Notes:

- If set to "warn", this acts like 0, but a warning is also raised.
- If set to `np.nan`, such values will be excluded from the average.

Expand Down Expand Up @@ -2407,6 +2411,7 @@ def recall_score(
Sets the value to return when there is a zero division.

Notes:

- If set to "warn", this acts like 0, but a warning is also raised.
- If set to `np.nan`, such values will be excluded from the average.

Expand Down
Loading