File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
doc/tutorial/text_analytics Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 55
55
56
56
# TASK: print the mean and std for each candidate along with the parameter
57
57
# settings for all the candidates explored by grid search.
58
- n_candidates = len (grid_search .results_ ['params' ])
58
+ n_candidates = len (grid_search .cv_results_ ['params' ])
59
59
for i in range (n_candidates ):
60
60
print (i , 'params - %s; mean - %0.2f; std - %0.2f'
61
- % (grid_search .results_ ['params' ][i ],
62
- grid_search .results_ [ 'test_mean_score ' ][i ],
63
- grid_search .results_ [ 'test_std_score ' ][i ]))
61
+ % (grid_search .cv_results_ ['params' ][i ],
62
+ grid_search .cv_results_ [ 'mean_test_score ' ][i ],
63
+ grid_search .cv_results_ [ 'std_test_score ' ][i ]))
64
64
65
65
# TASK: Predict the outcome on the testing set and store it in a variable
66
66
# named y_predicted
Original file line number Diff line number Diff line change @@ -458,9 +458,9 @@ mean score and the parameters setting corresponding to that score::
458
458
tfidf__use_idf: True
459
459
vect__ngram_range: (1, 1)
460
460
461
- A more detailed summary of the search is available at ``gs_clf.results_ ``.
461
+ A more detailed summary of the search is available at ``gs_clf.cv_results_ ``.
462
462
463
- The ``results_ `` parameter can be easily imported into pandas as a
463
+ The ``cv_results_ `` parameter can be easily imported into pandas as a
464
464
``DataFrame `` for further inspection.
465
465
466
466
.. note:
You can’t perform that action at this time.
0 commit comments