Skip to content
Snippets Groups Projects
Commit e157a455 authored by Gael Varoquaux's avatar Gael Varoquaux
Browse files

BUG: Fix doctests in pipeline.py

parent a3bd4197
No related branches found
No related tags found
No related merge requests found
......@@ -12,19 +12,20 @@ class Pipeline(BaseEstimator):
>>> from scikits.learn import svm, datasets
>>> from scikits.learn.datasets import samples_generator
>>> from scikits.learn.feature_selection.univariate_selection import UnivariateFilter,SelectKBest,f_regression
>>> from scikits.learn.feature_selection import SelectKBest, f_regression
>>> from scikits.learn.pipeline import Pipeline
>>> # import some data to play with
>>> # generate some data to play with
>>> X, y = samples_generator.test_dataset_classif(k=5)
>>> # ANOVA SVM-C
>>> anova_filter = UnivariateFilter(SelectKBest(k=5), f_regression)
>>> anova_filter = SelectKBest(f_regression, k=5)
>>> clf = svm.SVC(kernel='linear')
>>> anova_svm = Pipeline([anova_filter], clf)
>>> anova_svm.fit(X,y)
>>> anova_svm.predict(X)
>>> _ = anova_svm.fit(X,y)
>>> prediction = anova_svm.predict(X)
"""
def __init__(self, transformers=[], estimator=None):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment