Skip to content

Commit 8127172

Browse files
committed
COSMIT
1 parent 490fe3d commit 8127172

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/tutorial/text_analytics/solutions/exercise_02_sentiment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555

5656
# TASK: print the mean and std for each candidate along with the parameter
5757
# 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'])
5959
for i in range(n_candidates):
6060
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]))
6464

6565
# TASK: Predict the outcome on the testing set and store it in a variable
6666
# named y_predicted

doc/tutorial/text_analytics/working_with_text_data.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,9 @@ mean score and the parameters setting corresponding to that score::
458458
tfidf__use_idf: True
459459
vect__ngram_range: (1, 1)
460460

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_``.
462462

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
464464
``DataFrame`` for further inspection.
465465

466466
.. note:

0 commit comments

Comments
 (0)