Skip to content

Commit d04e52b

Browse files
committed
FIX: Apply ruff formatting fixes
1 parent c62edd0 commit d04e52b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

benchmarks/bench_tsne_mnist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
import numpy as np
1717
from joblib import Memory
18+
from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
1819

1920
from sklearn.datasets import fetch_openml
2021
from sklearn.decomposition import PCA
2122
from sklearn.manifold import TSNE
2223
from sklearn.neighbors import NearestNeighbors
2324
from sklearn.utils import check_array
2425
from sklearn.utils import shuffle as _shuffle
25-
from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
2626

2727
LOG_DIR = "mnist_tsne_output"
2828
if not os.path.exists(LOG_DIR):

sklearn/metrics/_plot/precision_recall_curve.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PrecisionRecallDisplay(_BinaryClassifierCurveDisplayMixin):
4747
.. versionadded:: 0.24
4848
4949
prevalence_pos_label : float, default=None
50-
The prevalence of the positive label. It is used for plotting the
50+
The prevalence of the positive label. It is used for plotting the
5151
prevalence baseline line (horizontal line representing the proportion
5252
of positive samples). If None, the baseline line will not be plotted
5353
even if `plot_chance_level` is set to True when plotting.
@@ -157,16 +157,16 @@ def plot(
157157
`estimator_name` if not `None`, otherwise no labeling is shown.
158158
159159
plot_chance_level : bool, default=False
160-
Whether to plot the prevalence baseline. The baseline is the prevalence
161-
of the positive label computed from the data passed during
160+
Whether to plot the prevalence baseline. The baseline is the prevalence
161+
of the positive label computed from the data passed during
162162
:meth:`from_estimator` or :meth:`from_predictions` call.
163163
164164
165165
.. versionadded:: 1.3
166166
167167
chance_level_kw : dict, default=None
168-
Keyword arguments to be passed to matplotlib's `plot` for rendering
169-
the prevalence baseline line (horizontal line representing the
168+
Keyword arguments to be passed to matplotlib's `plot` for rendering
169+
the prevalence baseline line (horizontal line representing the
170170
proportion of positive samples).
171171
172172
@@ -475,17 +475,17 @@ def from_predictions(
475475
Axes object to plot on. If `None`, a new figure and axes is created.
476476
477477
plot_chance_level : bool, default=False
478-
Whether to plot the prevalence baseline (horizontal reference line).
479-
The baseline represents the prevalence of the positive label computed
480-
from the data passed during :meth:`from_estimator` or
478+
Whether to plot the prevalence baseline (horizontal reference line).
479+
The baseline represents the prevalence of the positive label computed
480+
from the data passed during :meth:`from_estimator` or
481481
:meth:`from_predictions` call.
482482
483483
484484
.. versionadded:: 1.3
485485
486486
chance_level_kw : dict, default=None
487-
Keyword arguments to be passed to matplotlib's `plot` for rendering
488-
the prevalence baseline line (horizontal line representing the
487+
Keyword arguments to be passed to matplotlib's `plot` for rendering
488+
the prevalence baseline line (horizontal line representing the
489489
proportion of positive samples).
490490
491491

sklearn/metrics/_plot/roc_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class RocCurveDisplay(_BinaryClassifierCurveDisplayMixin):
9191
This attribute can now be a list of Artists, for when multiple curves
9292
are plotted.
9393
94-
chance_level : matplotlib Artist or None
94+
chance_level : matplotlib Artist or None
9595
The random classifier baseline line representing chance performance.
9696
It is `None` if the baseline is not plotted.
9797

0 commit comments

Comments
 (0)