Skip to content

Commit 8f1835e

Browse files
authored
docs: Fix the type of parameter (#1097)
Fixing the type of `pos_label` in the different docstrings. Here, it is the most consistent types that are accepted.
1 parent ad34c2d commit 8f1835e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

skore/src/skore/sklearn/_estimator/metrics_accessor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def report_metrics(
8383
same parameter name with different values), you can use scikit-learn scorers
8484
as provided by :func:`sklearn.metrics.make_scorer`.
8585
86-
pos_label : int, default=None
86+
pos_label : int, float, bool or str, default=None
8787
The positive class.
8888
8989
scoring_kwargs : dict, default=None
@@ -357,7 +357,7 @@ def precision(
357357
only the statistics of the positive class (i.e. equivalent to
358358
`average="binary"`).
359359
360-
pos_label : int, default=None
360+
pos_label : int, float, bool or str, default=None
361361
The positive class.
362362
363363
Returns
@@ -434,7 +434,7 @@ def recall(
434434
only the statistics of the positive class (i.e. equivalent to
435435
`average="binary"`).
436436
437-
pos_label : int, default=None
437+
pos_label : int, float, bool or str, default=None
438438
The positive class.
439439
440440
Returns
@@ -938,7 +938,7 @@ def roc(self, *, data_source="test", X=None, y=None, pos_label=None, ax=None):
938938
New target on which to compute the metric. By default, we use the target
939939
provided when creating the reporter.
940940
941-
pos_label : str, default=None
941+
pos_label : int, float, bool or str, default=None
942942
The positive class.
943943
944944
ax : matplotlib.axes.Axes, default=None
@@ -995,7 +995,7 @@ def precision_recall(
995995
New target on which to compute the metric. By default, we use the target
996996
provided when creating the reporter.
997997
998-
pos_label : str, default=None
998+
pos_label : int, float, bool or str, default=None
999999
The positive class.
10001000
10011001
ax : matplotlib.axes.Axes, default=None

skore/src/skore/sklearn/_estimator/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _get_cached_response_values(
288288
response_method : str
289289
The response method.
290290
291-
pos_label : str, default=None
291+
pos_label : int, float, bool or str, default=None
292292
The positive label.
293293
294294
data_source : {"test", "train", "X_y"}, default="test"

skore/src/skore/sklearn/_plot/roc_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class RocCurveDisplay(HelpDisplayMixin, _ClassifierCurveDisplayMixin):
5656
estimator_name : str
5757
Name of the estimator.
5858
59-
pos_label : str, default=None
59+
pos_label : int, float, bool or str, default=None
6060
The class considered as positive. Only meaningful for binary classification.
6161
6262
data_source : {"train", "test", "X_y"}, default=None

0 commit comments

Comments
 (0)