Skip to content

Commit 5daee96

Browse files
committed
DOC fix iterated_power='auto' in doctests
1 parent 4a72792 commit 5daee96

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

doc/modules/pipeline.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ is an estimator object::
4040
>>> estimators = [('reduce_dim', PCA()), ('clf', SVC())]
4141
>>> pipe = Pipeline(estimators)
4242
>>> pipe # doctest: +NORMALIZE_WHITESPACE
43-
Pipeline(steps=[('reduce_dim', PCA(copy=True, iterated_power=4,
43+
Pipeline(steps=[('reduce_dim', PCA(copy=True, iterated_power='auto',
4444
n_components=None, random_state=None, svd_solver='auto', tol=0.0,
4545
whiten=False)), ('clf', SVC(C=1.0, cache_size=200, class_weight=None,
4646
coef0=0.0, decision_function_shape=None, degree=3, gamma='auto',
@@ -64,20 +64,20 @@ filling in the names automatically::
6464
The estimators of a pipeline are stored as a list in the ``steps`` attribute::
6565

6666
>>> pipe.steps[0]
67-
('reduce_dim', PCA(copy=True, iterated_power=4, n_components=None, random_state=None,
67+
('reduce_dim', PCA(copy=True, iterated_power='auto', n_components=None, random_state=None,
6868
svd_solver='auto', tol=0.0, whiten=False))
6969

7070
and as a ``dict`` in ``named_steps``::
7171

7272
>>> pipe.named_steps['reduce_dim']
73-
PCA(copy=True, iterated_power=4, n_components=None, random_state=None,
73+
PCA(copy=True, iterated_power='auto', n_components=None, random_state=None,
7474
svd_solver='auto', tol=0.0, whiten=False)
7575

7676
Parameters of the estimators in the pipeline can be accessed using the
7777
``<estimator>__<parameter>`` syntax::
7878

7979
>>> pipe.set_params(clf__C=10) # doctest: +NORMALIZE_WHITESPACE
80-
Pipeline(steps=[('reduce_dim', PCA(copy=True, iterated_power=4,
80+
Pipeline(steps=[('reduce_dim', PCA(copy=True, iterated_power='auto',
8181
n_components=None, random_state=None, svd_solver='auto', tol=0.0,
8282
whiten=False)), ('clf', SVC(C=10, cache_size=200, class_weight=None,
8383
coef0=0.0, decision_function_shape=None, degree=3, gamma='auto',
@@ -166,7 +166,7 @@ and ``value`` is an estimator object::
166166
>>> combined = FeatureUnion(estimators)
167167
>>> combined # doctest: +NORMALIZE_WHITESPACE
168168
FeatureUnion(n_jobs=1, transformer_list=[('linear_pca', PCA(copy=True,
169-
iterated_power=4, n_components=None, random_state=None,
169+
iterated_power='auto', n_components=None, random_state=None,
170170
svd_solver='auto', tol=0.0, whiten=False)), ('kernel_pca',
171171
KernelPCA(alpha=1.0, coef0=1, copy_X=True, degree=3,
172172
eigen_solver='auto', fit_inverse_transform=False, gamma=None,
@@ -184,7 +184,7 @@ and ignored by setting to ``None``::
184184

185185
>>> combined.set_params(kernel_pca=None) # doctest: +NORMALIZE_WHITESPACE
186186
FeatureUnion(n_jobs=1, transformer_list=[('linear_pca', PCA(copy=True,
187-
iterated_power=4, n_components=None, random_state=None,
187+
iterated_power='auto', n_components=None, random_state=None,
188188
svd_solver='auto', tol=0.0, whiten=False)), ('kernel_pca', None)],
189189
transformer_weights=None)
190190

doc/tutorial/statistical_inference/unsupervised_learning.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ data by projecting on a principal subspace.
275275
>>> from sklearn import decomposition
276276
>>> pca = decomposition.PCA()
277277
>>> pca.fit(X)
278-
PCA(copy=True, iterated_power=4, n_components=None, random_state=None,
278+
PCA(copy=True, iterated_power='auto', n_components=None, random_state=None,
279279
svd_solver='auto', tol=0.0, whiten=False)
280280
>>> print(pca.explained_variance_) # doctest: +SKIP
281281
[ 2.18565811e+00 1.19346747e+00 8.43026679e-32]

0 commit comments

Comments
 (0)