Skip to content

Commit

Permalink
DOC fix items in docstring of zero_division (#30175)
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre authored Oct 29, 2024
1 parent 221b209 commit 49c5948
Showing 1 changed file with 8 additions and 3 deletions.
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

0 comments on commit 49c5948

Please sign in to comment.