scikit-learn/scikit-learn — pull request #1094 by ibayer (2012-09-01 13:35:48+00:00)
Title: Fix warning in Example: "Sample pipeline for text feature extraction and evaluation"

Avoid warning by adding underscore to: ``grid_search.best_estimator_`` and ``grid_search.best_score_``

```
Loading 20 newsgroups dataset for categories:
['alt.atheism', 'talk.religion.misc']
857 documents
2 categories

Performing grid search...
pipeline: ['vect', 'tfidf', 'clf']
parameters:
{'clf__alpha': (1e-05, 1e-06),
'clf__penalty': ('l2', 'elasticnet'),
'vect__max_df': (0.5, 0.75, 1.0),
'vect__max_n': (1, 2)}
[Parallel(n_jobs=-1)]: Done 1 jobs | elapsed: 35.0s
[Parallel(n_jobs=-1)]: Done 50 jobs | elapsed: 2.3min
[Parallel(n_jobs=-1)]: Done 66 out of 72 | elapsed: 2.9min remaining: 15.9s
[Parallel(n_jobs=-1)]: Done 72 out of 72 | elapsed: 3.0min finished
done in 188.127s

Best score: 0.930
Best parameters set:
clf__alpha: 1e-05
clf__penalty: 'l2'
vect__max_df: 1.0
vect__max_n: 1
```
I noticed also that the doc string and terminal output don't fit together, since they estimate different parameters. I don't understand why the number of samples is different.
http://scikit-learn.org/dev/auto_examples/grid_search_text_feature_extraction.html