Skip to content

Commit 1ba0783

Browse files
MAINT Fix typos found by codespell (scikit-learn#26852)
1 parent fa8cd70 commit 1ba0783

File tree

19 files changed

+24
-24
lines changed

19 files changed

+24
-24
lines changed

doc/whats_new/older_versions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ API changes summary
344344
Please use :class:`~covariance.EllipticEnvelope` instead.
345345

346346
- ``NeighborsClassifier`` and ``NeighborsRegressor`` are gone in the module
347-
:ref:`neighbors`. Use the classes :class:`~neighors.KNeighborsClassifier`,
348-
:class:`~neighors.RadiusNeighborsClassifier`, :class:`~neighors.KNeighborsRegressor`
349-
and/or :class:`~neighors.RadiusNeighborsRegressor` instead.
347+
:ref:`neighbors`. Use the classes :class:`~neighbors.KNeighborsClassifier`,
348+
:class:`~neighbors.RadiusNeighborsClassifier`, :class:`~neighbors.KNeighborsRegressor`
349+
and/or :class:`~neighbors.RadiusNeighborsRegressor` instead.
350350

351351
- Sparse classes in the :ref:`sgd` module are now deprecated.
352352

examples/bicluster/plot_spectral_biclustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
# %%
5959
# We redefine the shuffled data and plot it. We observe that we lost the
60-
# strucuture of original data matrix.
60+
# structure of original data matrix.
6161
data = data[row_idx_shuffled][:, col_idx_shuffled]
6262

6363
plt.matshow(data, cmap=plt.cm.Blues)

examples/cluster/plot_hdbscan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def plot(X, labels, probabilities=None, parameters=None, ground_truth=False, ax=
113113
# ----------------------
114114
# HDBSCAN is much more than scale invariant though -- it is capable of
115115
# multi-scale clustering, which accounts for clusters with varying density.
116-
# Traditional DBSCAN assumes that any potential clusters are homogenous in
116+
# Traditional DBSCAN assumes that any potential clusters are homogeneous in
117117
# density. HDBSCAN is free from such constraints. To demonstrate this we
118118
# consider the following dataset
119119
centers = [[-0.85, -0.85], [-0.85, 0.85], [3, 3], [3, -3]]

examples/ensemble/plot_forest_hist_grad_boosting_comparison.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
The comparison is made by varying the parameters that control the number of
1212
trees according to each estimator:
1313
14-
- `n_estimators` controls the number of trees in the forest. It's a fixed numer.
14+
- `n_estimators` controls the number of trees in the forest. It's a fixed number.
1515
- `max_iter` is the the maximum number of iterations in a gradient boosting
1616
based model. The number of iterations corresponds to the number of trees for
1717
regression and binary classification problems. Furthermore, the actual number
@@ -202,7 +202,7 @@
202202
# makes fitting and scoring slower. The RF model reaches such plateau earlier
203203
# and can never reach the test score of the largest HGBDT model.
204204
#
205-
# Note that the results shown on the above plot can change sightly across runs
205+
# Note that the results shown on the above plot can change slightly across runs
206206
# and even more significantly when running on other machines: try to run this
207207
# example on your own local machine.
208208
#

examples/linear_model/plot_ridge_coeffs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
# `alpha` increases, the highest coefficients shrink more rapidly, rendering
163163
# their corresponding features less influential in the training process. This
164164
# can enhance a model's ability to generalize to unseen data (if there was a lot
165-
# of noise to capture), but it also poses the risk of loosing performance if the
165+
# of noise to capture), but it also poses the risk of losing performance if the
166166
# regularization becomes too strong compared to the amount of noise the data
167167
# contained (as in this example).
168168
#

examples/miscellaneous/plot_display_object_visualization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Create :class:`ConfusionMatrixDisplay`
4040
##############################################################################
4141
# With the fitted model, we compute the predictions of the model on the test
42-
# dataset. These predictions are used to compute the confustion matrix which
42+
# dataset. These predictions are used to compute the confusion matrix which
4343
# is plotted with the :class:`ConfusionMatrixDisplay`
4444
from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix
4545

examples/miscellaneous/plot_metadata_routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def predict(self, X, **predict_params):
368368
# In ``get_metadata_routing``, we add ``self`` to the routing using
369369
# ``add_self_request`` to indicate this estimator is consuming
370370
# ``sample_weight`` as well as being a router; which also adds a
371-
# ``$self_request`` key to the routing info as illustrated bellow. Now let's
371+
# ``$self_request`` key to the routing info as illustrated below. Now let's
372372
# look at some examples:
373373

374374
# %%

sklearn/cluster/_hdbscan/_tree.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ cpdef cnp.ndarray[CONDENSED_t, ndim=1, mode='c'] _condense_tree(
133133
A single linkage hierarchy in scipy.cluster.hierarchy format.
134134
135135
min_cluster_size : int, optional (default 10)
136-
The minimum size of clusters to consider. Clusters smaler than this
136+
The minimum size of clusters to consider. Clusters smaller than this
137137
are pruned from the tree.
138138
139139
Returns

sklearn/cluster/_hdbscan/hdbscan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def _weighted_cluster_center(self, X):
900900
self.medoids_ = np.empty((n_clusters, X.shape[1]), dtype=np.float64)
901901

902902
# Need to handle iteratively seen each cluster may have a different
903-
# number of samples, hence we can't create a homogenous 3D array.
903+
# number of samples, hence we can't create a homogeneous 3D array.
904904
for idx in range(n_clusters):
905905
mask = self.labels_ == idx
906906
data = X[mask]

sklearn/datasets/tests/test_openml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ def test_fetch_openml_verify_checksum(monkeypatch, as_frame, cache, tmpdir, pars
15341534
modified_gzip.write(data)
15351535

15361536
# Requests are already mocked by monkey_patch_webbased_functions.
1537-
# We want to re-use that mock for all requests except file download,
1537+
# We want to reuse that mock for all requests except file download,
15381538
# hence creating a thin mock over the original mock
15391539
mocked_openml_url = sklearn.datasets._openml.urlopen
15401540

0 commit comments

Comments
 (0)