@@ -45,20 +45,19 @@ The estimators of the pipeline are stored as a list in the ``steps`` attribute::
4545
4646and as a ``dict `` in ``named_steps ``::
4747 >>> clf.named_steps['reduce_dim']
48- ('reduce_dim', PCA(copy=True, n_components=None, whiten=False) )
48+ PCA(copy=True, n_components=None, whiten=False)
4949
5050Parameters of the estimators in the pipeline can be accessed using the
5151``<estimator>__<parameter> `` syntax::
52- >>> clf.set_params(svm__C=10)
53- Pipeline(steps=[('reduce_dim', PCA(copy=True, n_components=None,
54- whiten=False)), ('svm', SVC(C=1.0, cache_size=200, class_weight=None,
55- coef0=0.0, degree=3, gamma=0.0, kernel='rbf', probability=False,
56- shrinking=True, tol=0.001, verbose=False))])
52+ >>> clf.set_params(svm__C=10) # NORMALIZE_WHITESPACE
53+ Pipeline(steps=[('reduce_dim', PCA(copy=True, n_components=None, whiten=False)), ('svm', SVC(C=10, cache_size=200, class_weight=None, coef0=0.0, degree=3, gamma=0.0,
54+ kernel='rbf', probability=False, shrinking=True, tol=0.001,
55+ verbose=False))])
5756
5857This is particularly important for doing grid searches::
5958 >>> from sklearn.grid_search import GridSearchCV
60- >>> params = dict(reduce_dim__n_components=[2, 5, 10], \
61- svm__C=[0.1, 10, 100])
59+ >>> params = dict(reduce_dim__n_components=[2, 5, 10],
60+ ... svm__C=[0.1, 10, 100])
6261 >>> grid_search = GridSearchCV(clf, param_grid=params)
6362
6463
0 commit comments