Skip to content

Commit 3e3e14e

Browse files
MNT Fix typos found by codespell (scikit-learn#31012)
1 parent a56c840 commit 3e3e14e

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

build_tools/codespell_ignore_words.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
achin
12
aggresive
23
aline
34
ba
45
basf
56
boun
67
bre
78
cach
9+
chanel
810
complies
911
coo
1012
copys
13+
datas
1114
deine
1215
didi
1316
feld
@@ -17,11 +20,13 @@ fro
1720
fwe
1821
gool
1922
hart
23+
heping
2024
hist
2125
ines
2226
inout
2327
ist
2428
jaques
29+
lamas
2530
linke
2631
lod
2732
mape
@@ -31,6 +36,7 @@ nmae
3136
ocur
3237
pullrequest
3338
ro
39+
ser
3440
soler
3541
suh
3642
suprised
@@ -40,6 +46,8 @@ teh
4046
thi
4147
usal
4248
vie
49+
vor
4350
wan
51+
whis
4452
winn
4553
yau

doc/images/ml_map.svg

Lines changed: 1 addition & 1 deletion
Loading

doc/modules/cross_validation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ Some classification tasks can naturally exhibit rare classes: for instance,
527527
there could be orders of magnitude more negative observations than positive
528528
observations (e.g. medical screening, fraud detection, etc). As a result,
529529
cross-validation splitting can generate train or validation folds without any
530-
occurence of a particular class. This typically leads to undefined
530+
occurrence of a particular class. This typically leads to undefined
531531
classification metrics (e.g. ROC AUC), exceptions raised when attempting to
532532
call :term:`fit` or missing columns in the output of the `predict_proba` or
533533
`decision_function` methods of multiclass classifiers trained on different
@@ -903,7 +903,7 @@ is always used to train the model.
903903

904904
This class can be used to cross-validate time series data samples
905905
that are observed at fixed time intervals. Indeed, the folds must
906-
represent the same duration, in order to have comparable metrics accross folds.
906+
represent the same duration, in order to have comparable metrics across folds.
907907

908908
Example of 3-split time series cross-validation on a dataset with 6 samples::
909909

sklearn/inspection/_plot/decision_boundary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def plot(self, plot_method="contourf", ax=None, xlabel=None, ylabel=None, **kwar
234234
cmap = "gist_rainbow"
235235

236236
# Special case for the tab10 and tab20 colormaps that encode a
237-
# discret set of colors that are easily distinguishable
237+
# discrete set of colors that are easily distinguishable
238238
# contrary to other colormaps that are continuous.
239239
if cmap == "tab10" and n_responses <= 10:
240240
colors = plt.get_cmap("tab10", 10).colors[:n_responses]

sklearn/model_selection/tests/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ def fake_score_func(y_true, y_pred):
13421342
search_cv.set_params(scoring=fake_scorer)
13431343
with pytest.warns(UserWarning, match="does not support sample_weight"):
13441344
search_cv.fit(X, y, sample_weight=sw)
1345-
# multi-metric evalutation
1345+
# multi-metric evaluation
13461346
search_cv.set_params(
13471347
scoring=dict(fake=fake_scorer, accuracy="accuracy"), refit=False
13481348
)

sklearn/preprocessing/_discretization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def fit(self, X, y=None, sample_weight=None):
318318
)
319319

320320
if self.strategy != "quantile" and sample_weight is not None:
321-
# Preprare a mask to filter out zero-weight samples when extracting
321+
# Prepare a mask to filter out zero-weight samples when extracting
322322
# the min and max values of each columns which are needed for the
323323
# "uniform" and "kmeans" strategies.
324324
nnz_weight_mask = sample_weight != 0

0 commit comments

Comments
 (0)