Skip to content

Commit 0c28c82

Browse files
authored
DOC Fix various typos in documentation and comments (scikit-learn#31404)
1 parent d077f82 commit 0c28c82

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

doc/modules/ensemble.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ values.
308308
all of the :math:`2^{K - 1} - 1` partitions, where :math:`K` is the number of
309309
categories. This can quickly become prohibitive when :math:`K` is large.
310310
Fortunately, since gradient boosting trees are always regression trees (even
311-
for classification problems), there exist a faster strategy that can yield
311+
for classification problems), there exists a faster strategy that can yield
312312
equivalent splits. First, the categories of a feature are sorted according to
313313
the variance of the target, for each category `k`. Once the categories are
314314
sorted, one can consider *continuous partitions*, i.e. treat the categories
@@ -1587,7 +1587,7 @@ Note that it is also possible to get the output of the stacked
15871587

15881588
In practice, a stacking predictor predicts as good as the best predictor of the
15891589
base layer and even sometimes outperforms it by combining the different
1590-
strengths of the these predictors. However, training a stacking predictor is
1590+
strengths of these predictors. However, training a stacking predictor is
15911591
computationally expensive.
15921592

15931593
.. note::

examples/bicluster/plot_spectral_biclustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# --------------------
2727
# We generate the sample data using the
2828
# :func:`~sklearn.datasets.make_checkerboard` function. Each pixel within
29-
# `shape=(300, 300)` represents with it's color a value from a uniform
29+
# `shape=(300, 300)` represents with its color a value from a uniform
3030
# distribution. The noise is added from a normal distribution, where the value
3131
# chosen for `noise` is the standard deviation.
3232
#

examples/cluster/plot_agglomerative_clustering_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
We add observation noise to these waveforms. We generate very sparse
2020
noise: only 6% of the time points contain noise. As a result, the
21-
l1 norm of this noise (ie "cityblock" distance) is much smaller than it's
21+
l1 norm of this noise (ie "cityblock" distance) is much smaller than its
2222
l2 norm ("euclidean" distance). This can be seen on the inter-class
2323
distance matrices: the values on the diagonal, that characterize the
2424
spread of the class, are much bigger for the Euclidean distance than for

examples/svm/plot_svm_kernels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def plot_training_data_with_decision_boundary(
255255
# that may not generalize well to unseen data. From this example it becomes
256256
# obvious, that the sigmoid kernel has very specific use cases, when dealing
257257
# with data that exhibits a sigmoidal shape. In this example, careful fine
258-
# tuning might find more generalizable decision boundaries. Because of it's
258+
# tuning might find more generalizable decision boundaries. Because of its
259259
# specificity, the sigmoid kernel is less commonly used in practice compared to
260260
# other kernels.
261261
#

sklearn/_loss/_loss.pyx.tp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ doc_HalfTweedieLoss = (
121121
- y_true * exp((1-p) * raw_prediction) / (1-p)
122122

123123
Notes:
124-
- Poisson with p=1 and and Gamma with p=2 have different terms dropped such
124+
- Poisson with p=1 and Gamma with p=2 have different terms dropped such
125125
that cHalfTweedieLoss is not continuous in p=power at p=1 and p=2.
126126
- While the Tweedie distribution only exists for p<=0 or p>=1, the range
127127
0<p<1 still gives a strictly consistent scoring function for the

sklearn/preprocessing/_function_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def transform(self, X):
262262

263263
if hasattr(out, "columns") and self.feature_names_out is not None:
264264
# check the consistency between the column provided by `transform` and
265-
# the the column names provided by `get_feature_names_out`.
265+
# the column names provided by `get_feature_names_out`.
266266
feature_names_out = self.get_feature_names_out()
267267
if list(out.columns) != list(feature_names_out):
268268
# we can override the column names of the output if it is inconsistent

sklearn/utils/fixes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _smallest_admissible_index_dtype(arrays=(), maxval=None, check_contents=Fals
288288
type that can hold the data in the arrays.
289289
290290
This function returns `np.int64` if it either required by `maxval` or based on the
291-
largest precision of the dtype of the arrays passed as argument, or by the their
291+
largest precision of the dtype of the arrays passed as argument, or by their
292292
contents (when `check_contents is True`). If none of the condition requires
293293
`np.int64` then this function returns `np.int32`.
294294

sklearn/utils/tests/test_array_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def __init__(self, device_name):
294294
assert array1.device == device(array1, array1, array2)
295295

296296

297-
# TODO: add cupy to the list of libraries once the the following upstream issue
297+
# TODO: add cupy to the list of libraries once the following upstream issue
298298
# has been fixed:
299299
# https://github.com/cupy/cupy/issues/8180
300300
@skip_if_array_api_compat_not_configured

0 commit comments

Comments
 (0)