8000 DOC use backticks for n_samples and n_features in X docstring (#20914) · scikit-learn/scikit-learn@6421278 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6421278

Browse files
authored
DOC use backticks for n_samples and n_features in X docstring (#20914)
1 parent d6be41b commit 6421278

33 files changed

+170
-170
lines changed

sklearn/compose/_target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ def fit(self, X, y, **fit_params):
187187
Parameters
188188
----------
189189
X : {array-like, sparse matrix} of shape (n_samples, n_features)
190-
Training vector, where n_samples is the number of samples and
191-
n_features is the number of features.
190+
Training vector, where `n_samples` is the number of samples and
191+
`n_features` is the number of features.
192192
193193
y : array-like of shape (n_samples,)
194194
Target values.

sklearn/covariance/_empirical_covariance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ def fit(self, X, y=None):
213213
Parameters
214214
----------
215215
X : array-like of shape (n_samples, n_features)
216-
Training data, where n_samples is the number of samples and
217-
n_features is the number of features.
216+
Training data, where `n_samples` is the number of samples and
217+
`n_features` is the number of features.
218218
219219
y : Ignored
220220
Not used, present for API consistency by convention.
@@ -240,9 +240,9 @@ def score(self, X_test, y=None):
240240
Parameters
241241
----------
242242
X_test : array-like of shape (n_samples, n_features)
243-
Test data of which we compute the likelihood, where n_samples is
244-
the number of samples and n_features is the number of features.
245-
X_test is assumed to be drawn from the same distribution than
243+
Test data of which we compute the likelihood, where `n_samples` is
244+
the number of samples and `n_features` is the number of features.
245+
`X_test` is assumed to be drawn from the same distribution than
246246
the data used in fit (including centering).
247247
248248
y : Ignored

sklearn/covariance/_shrunk_covariance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def fit(self, X, y=None):
157157
Parameters
158158
----------
159159
X : array-like of shape (n_samples, n_features)
160-
Training data, where n_samples is the number of samples
161-
and n_features is the number of features.
160+
Training data, where `n_samples` is the number of samples
161+
and `n_features` is the number of features.
162162
163163
y : Ignored
164164
Not used, present for API consistency by convention.

sklearn/cross_decomposition/_pls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,12 @@ def fit_transform(self, X, y=None):
462462
Parameters
463463
----------
464464
X : array-like of shape (n_samples, n_features)
465-
Training vectors, where n_samples is the number of samples and
466-
n_features is the number of predictors.
465+
Training vectors, where `n_samples` is the number of samples and
466+
`n_features` is the number of predictors.
467467
468468
y : array-like of shape (n_samples, n_targets), default=None
469-
Target vectors, where n_samples is the number of samples and
470-
n_targets is the number of response variables.
469+
Target vectors, where `n_samples` is the number of samples and
470+
`n_targets` is the number of response variables.
471471
472472
Returns
473473
-------

sklearn/datasets/_svmlight_format_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ def dump_svmlight_file(
438438
Parameters
439439
----------
440440
X : {array-like, sparse matrix} of shape (n_samples, n_features)
441-
Training vectors, where n_samples is the number of samples and
442-
n_features is the number of features.
441+
Training vectors, where `n_samples` is the number of samples and
442+
`n_features` is the number of features.
443443
444444
y : {array-like, sparse matrix}, shape = [n_samples (, n_labels)]
445445
Target values. Class labels must be an

sklearn/decomposition/_base.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def fit(self, X, y=None):
8585
Parameters
8686
----------
8787
X : array-like of shape (n_samples, n_features)
88-
Training data, where n_samples is the number of samples and
89-
n_features is the number of features.
88+
Training data, where `n_samples` is the number of samples and
89+
`n_features` is the number of features.
9090
9191
Returns
9292
-------
@@ -103,14 +103,14 @@ def transform(self, X):
103103
Parameters
104104
----------
105105
X : array-like of shape (n_samples, n_features)
106-
New data, where n_samples is the number of samples
107-
and n_features is the number of features.
106+
New data, where `n_samples` is the number of samples
107+
and `n_features` is the number of features.
108108
109109
Returns
110110
-------
111111
X_new : array-like of shape (n_samples, n_components)
112-
Projection of X in the first principal components, where n_samples
113-
is the number of samples and n_components is the number of the components.
112+
Projection of X in the first principal components, where `n_samples`
113+
is the number of samples and `n_components` is the number of the components.
114114
"""
115115
check_is_fitted(self)
116116

@@ -130,14 +130,14 @@ def inverse_transform(self, X):
130130
Parameters
131131
----------
132132
X : array-like of shape (n_samples, n_components)
133-
New data, where n_samples is the number of samples
134-
and n_components is the number of components.
133+
New data, where `n_samples` is the number of samples
134+
and `n_components` is the number of components.
135135
136136
Returns
137137
-------
138138
X_original array-like of shape (n_samples, n_features)
139-
Original data, where n_samples is the number of samples
140-
and n_features is the number of features.
139+
Original data, where `n_samples` is the number of samples
140+
and `n_features` is the number of features.
141141
142142
Notes
143143
-----

sklearn/decomposition/_dict_learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ def fit(self, X, y=None):
15461546
Parameters
15471547
----------
15481548
X : array-like of shape (n_samples, n_features)
1549-
Training vector, where `n_samples` in the number of samples
1549+
Training vector, where `n_samples` is the number of samples
15501550
and `n_features` is the number of features.
15511551
15521552
y : Ignored

sklearn/decomposition/_fastica.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def fastica(
172172
Parameters
173173
----------
174174
X : array-like of shape (n_samples, n_features)
175-
Training vector, where n_samples is the number of samples and
176-
n_features is the number of features.
175+
Training vector, where `n_samples` is the number of samples and
176+
`n_features` is the number of features.
177177
178178
n_components : int, default=None
179179
Number of components to extract. If None no dimension reduction
@@ -464,8 +464,8 @@ def _fit(self, X, compute_sources=False):
464464
Parameters
465465
----------
466466
X : array-like of shape (n_samples, n_features)
467-
Training data, where n_samples is the number of samples
468-
and n_features is the number of features.
467+
Training data, where `n_samples` is the number of samples
468+
and `n_features` is the number of features.
469469
470470
compute_sources : bool, default=False
471471
If False, sources are not computes but only the rotation matrix.
@@ -600,8 +600,8 @@ def fit_transform(self, X, y=None):
600600
Parameters
601601
----------
602602
X : array-like of shape (n_samples, n_features)
603-
Training data, where n_samples is the number of samples
604-
and n_features is the number of features.
603+
Training data, where `n_samples` is the number of samples
604+
and `n_features` is the number of features.
605605
606606
y : Ignored
607607
Not used, present for API consistency by convention.
@@ -620,8 +620,8 @@ def fit(self, X, y=None):
620620
Parameters
621621
----------
622622
X : array-like of shape (n_samples, n_features)
623-
Training data, where n_samples is the number of samples
624-
and n_features is the number of features.
623+
Training data, where `n_samples` is the number of samples
624+
and `n_features` is the number of features.
625625
626626
y : Ignored
627627
Not used, present for API consistency by convention.
@@ -640,8 +640,8 @@ def transform(self, X, copy=True):
640640
Parameters
641641
----------
642642
X : array-like of shape (n_samples, n_features)
643-
Data to transform, where n_samples is the number of samples
644-
and n_features is the number of features.
643+
Data to transform, where `n_samples` is the number of samples
644+
and `n_features` is the number of features.
645645
646646
copy : bool, default=True
647647
If False, data passed to fit can be overwritten. Defaults to True.
@@ -668,8 +668,8 @@ def inverse_transform(self, X, copy=True):
668668
Parameters
669669
----------
670670
X : array-like of shape (n_samples, n_components)
671-
Sources, where n_samples is the number of samples
672-
and n_components is the number of components.
671+
Sources, where `n_samples` is the number of samples
672+
and `n_components` is the number of components.
673673
copy : bool, default=True
674674
If False, data passed to fit are overwritten. Defaults to True.
675675

sklearn/decomposition/_incremental_pca.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def fit(self, X, y=None):
190190
Parameters
191191
----------
192192
X : {array-like, sparse matrix} of shape (n_samples, n_features)
193-
Training data, where n_samples is the number of samples and
194-
n_features is the number of features.
193+
Training data, where `n_samples` is the number of samples and
194+
`n_features` is the number of features.
195195
196196
y : Ignored
197197
Not used, present for API consistency by convention.
@@ -239,8 +239,8 @@ def partial_fit(self, X, y=None, check_input=True):
239239
Parameters
240240
----------
241241
X : array-like of shape (n_samples, n_features)
242-
Training data, where n_samples is the number of samples and
243-
n_features is the number of features.
242+
Training data, where `n_samples` is the number of samples and
243+
`n_features` is the number of features.
244244
245245
y : Ignored
246246
Not used, present for API consistency by convention.
@@ -360,8 +360,8 @@ def transform(self, X):
360360
Parameters
361361
----------
362362
X : {array-like, sparse matrix} of shape (n_samples, n_features)
363-
New data, where n_samples is the number of samples
364-
and n_features is the number of features.
363+
New data, where `n_samples` is the number of samples
364+
and `n_features` is the number of features.
365365
366366
Returns
367367
-------

sklearn/decomposition/_pca.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ def fit(self, X, y=None):
368368
Parameters
369369
----------
370370
X : array-like of shape (n_samples, n_features)
371-
Training data, where n_samples is the number of samples
372-
and n_features is the number of features.
371+
Training data, where `n_samples` is the number of samples
372+
and `n_features` is the number of features.
373373
374374
y : Ignored
375375
Ignored.
@@ -388,8 +388,8 @@ def fit_transform(self, X, y=None):
388388
Parameters
389389
----------
390390
X : array-like of shape (n_samples, n_features)
391-
Training data, where n_samples is the number of samples
392-
and n_features is the number of features.
391+
Training data, where `n_samples` is the number of samples
392+
and `n_features` is the number of features.
393393
394394
y : Ignored
395395
Ignored.

sklearn/decomposition/_sparse_pca.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def fit(self, X, y=None):
157157
Parameters
158158
----------
159159
X : array-like of shape (n_samples, n_features)
160-
Training vector, where n_samples is the number of samples
161-
and n_features is the number of features.
160+
Training vector, where `n_samples` is the number of samples
161+
and `n_features` is the number of features.
162162
163163
y : Ignored
164164
Not used, present here for API consistency by convention.

sklearn/discriminant_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@ def fit(self, X, y):
828828
Parameters
829829
----------
830830
X : array-like of shape (n_samples, n_features)
831-
Training vector, where n_samples is the number of samples and
832-
n_features is the number of features.
831+
Training vector, where `n_samples` is the number of samples and
832+
`n_features` is the number of features.
833833
834834
y : array-like of shape (n_samples,)
835835
Target values (integers)

sklearn/ensemble/_stacking.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ def predict(self, X, **predict_params):
248248
Parameters
249249
----------
250250
X : {array-like, sparse matrix} of shape (n_samples, n_features)
251-
Training vectors, where n_samples is the number of samples and
252-
n_features is the number of features.
251+
Training vectors, where `n_samples` is the number of samples and
252+
`n_features` is the number of features.
253253
254254
**predict_params : dict of str -> obj
255255
Parameters to the `predict` called by the `final_estimator`. Note
@@ -490,8 +490,8 @@ def predict(self, X, **predict_params):
490490
Parameters
491491
----------
492492
X : {array-like, sparse matrix} of shape (n_samples, n_features)
493-
Training vectors, where n_samples is the number of samples and
494-
n_features is the number of features.
493+
Training vectors, where `n_samples` is the number of samples and
494+
`n_features` is the number of features.
495495
496496
**predict_params : dict of str -> obj
497497
Parameters to the `predict` called by the `final_estimator`. Note
@@ -515,8 +515,8 @@ def predict_proba(self, X):
515515
Parameters
516516
----------
517517
X : {array-like, sparse matrix} of shape (n_samples, n_features)
518-
Training vectors, where n_samples is the number of samples and
519-
n_features is the number of features.
518+
Training vectors, where `n_samples` is the number of samples and
519+
`n_features` is the number of features.
520520
521521
Returns
522522
-------
@@ -535,8 +535,8 @@ def decision_function(self, X):
535535
Parameters
536536
----------
537537
X : {array-like, sparse matrix} of shape (n_samples, n_features)
538-
Training vectors, where n_samples is the number of samples and
539-
n_features is the number of features.
538+
Training vectors, where `n_samples` is the number of samples and
539+
`n_features` is the number of features.
540540
541541
Returns
542542
-------
@@ -734,8 +734,8 @@ def fit(self, X, y, sample_weight=None):
734734
Parameters
735735
----------
736736
X : {array-like, sparse matrix} of shape (n_samples, n_features)
737-
Training vectors, where n_samples is the number of samples and
738-
n_features is the number of features.
737+
Training vectors, where `n_samples` is the number of samples and
738+
`n_features` is the number of features.
739739
740740
y : array-like of shape (n_samples,)
741741
Target values.

sklearn/ensemble/_voting.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ def fit(self, X, y, sample_weight=None):
288288
Parameters
289289
----------
290290
X : {array-like, sparse matrix} of shape (n_samples, n_features)
291-
Training vectors, where n_samples is the number of samples and
292-
n_features is the number of features.
291+
Training vectors, where `n_samples` is the number of samples and
292+
`n_features` is the number of features.
293293
294294
y : array-like of shape (n_samples,)
295295
Target values.
@@ -390,8 +390,8 @@ def transform(self, X):
390390
Parameters
391391
----------
392392
X : {array-like, sparse matrix} of shape (n_samples, n_features)
393-
Training vectors, where n_samples is the number of samples and
394-
n_features is the number of features.
393+
Training vectors, where `n_samples` is the number of samples and
394+
`n_features` is the number of features.
395395
396396
Returns
397397
-------
@@ -510,8 +510,8 @@ def fit(self, X, y, sample_weight=None):
510510
Parameters
511511
----------
512512
X : {array-like, sparse matrix} of shape (n_samples, n_features)
513-
Training vectors, where n_samples is the number of samples and
514-
n_features is the number of features.
513+
Training vectors, where `n_samples` is the number of samples and
514+
`n_features` is the number of features.
515515
516516
y : array-like of shape (n_samples,)
517517
Target values.

0 commit comments

Comments
 (0)
0