Skip to content

Commit

Permalink
docs: Fix the type of parameter (#1097)
Browse files Browse the repository at this point in the history
Fixing the type of `pos_label` in the different docstrings.
Here, it is the most consistent types that are accepted.
  • Loading branch information
glemaitre authored Jan 14, 2025
1 parent ad34c2d commit 8f1835e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions skore/src/skore/sklearn/_estimator/metrics_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def report_metrics(
same parameter name with different values), you can use scikit-learn scorers
as provided by :func:`sklearn.metrics.make_scorer`.
pos_label : int, default=None
pos_label : int, float, bool or str, default=None
The positive class.
scoring_kwargs : dict, default=None
Expand Down Expand Up @@ -357,7 +357,7 @@ def precision(
only the statistics of the positive class (i.e. equivalent to
`average="binary"`).
pos_label : int, default=None
pos_label : int, float, bool or str, default=None
The positive class.
Returns
Expand Down Expand Up @@ -434,7 +434,7 @@ def recall(
only the statistics of the positive class (i.e. equivalent to
`average="binary"`).
pos_label : int, default=None
pos_label : int, float, bool or str, default=None
The positive class.
Returns
Expand Down Expand Up @@ -938,7 +938,7 @@ def roc(self, *, data_source="test", X=None, y=None, pos_label=None, ax=None):
New target on which to compute the metric. By default, we use the target
provided when creating the reporter.
pos_label : str, default=None
pos_label : int, float, bool or str, default=None
The positive class.
ax : matplotlib.axes.Axes, default=None
Expand Down Expand Up @@ -995,7 +995,7 @@ def precision_recall(
New target on which to compute the metric. By default, we use the target
provided when creating the reporter.
pos_label : str, default=None
pos_label : int, float, bool or str, default=None
The positive class.
ax : matplotlib.axes.Axes, default=None
Expand Down
2 changes: 1 addition & 1 deletion skore/src/skore/sklearn/_estimator/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def _get_cached_response_values(
response_method : str
The response method.
pos_label : str, default=None
pos_label : int, float, bool or str, default=None
The positive label.
data_source : {"test", "train", "X_y"}, default="test"
Expand Down
2 changes: 1 addition & 1 deletion skore/src/skore/sklearn/_plot/roc_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RocCurveDisplay(HelpDisplayMixin, _ClassifierCurveDisplayMixin):
estimator_name : str
Name of the estimator.
pos_label : str, default=None
pos_label : int, float, bool or str, default=None
The class considered as positive. Only meaningful for binary classification.
data_source : {"train", "test", "X_y"}, default=None
Expand Down

0 comments on commit 8f1835e

Please sign in to comment.