title: GridSearchCV scoring and grid_scores_
body: <p>I am trying to understand how to obtain the values of the scorer for the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.GridSearchCV.html" rel="nofollow">GridSearchCV</a>. The example code below sets up a small pipeline on text data. </p>
  
  <p>Then it sets up a grid search over different ngrams. </p>
  
  <p>The scoring is done through the f1 measure:</p>
  
  <pre><code>#setup the pipeline
  tfidf_vec = TfidfVectorizer(analyzer='word', min_df=0.05, max_df=0.95)
  linearsvc = LinearSVC()
  clf = Pipeline([('tfidf_vec', tfidf_vec), ('linearsvc', linearsvc)])
  
  # setup the grid search
  parameters = {'tfidf_vec__ngram_range': [(1, 1), (1, 2)]}
  gs_clf = GridSearchCV(clf, parameters, n_jobs=-1, scoring='f1')
  gs_clf = gs_clf.fit(docs_train, y_train)
  </code></pre>
  
  <p>Now I can print the scores with:</p>
  
  <p>print gs_clf.grid_scores_</p>
  
  <pre><code>[mean: 0.81548, std: 0.01324, params: {'tfidf_vec__ngram_range': (1, 1)},
   mean: 0.82143, std: 0.00538, params: {'tfidf_vec__ngram_range': (1, 2)}]
  </code></pre>
  
  <p>print gs_clf.grid_scores_[0].cv_validation_scores</p>
  
  <pre><code>array([ 0.83234714,  0.8       ,  0.81409002])
  </code></pre>
  
  <p>It is not clear to me from the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.GridSearchCV.html" rel="nofollow">documentation</a>:</p>
  
  <ol>
  <li><p>Is gs_clf.grid_scores_[0].cv_validation_scores an array with the scores defined through the scoring parameter, per fold (in this case, the f1 measures per fold) ? If not, what is it then?</p></li>
  <li><p>If I instead choose another <a href="http://scikit-learn.org/stable/modules/model_evaluation.html" rel="nofollow">metric</a>, such as scoring='f1_micro', each array in gs_clf.grid_scores_[i].cv_validation_scores will contain the f1_micro metric for the folds for a particular grid search parameter selection?</p></li>
  </ol>