title: Get corresponding classes to predict_proba (GridSearchCV sklearn)
body: <p>I'm using GridSearchCV and a pipeline to classify some text documents. A code snippet:</p>
  
  <pre><code>clf = Pipeline([('vect', TfidfVectorizer()), ('clf', SVC())])
  parameters = {'vect__ngram_range' : [(1,2)], 'vect__min_df' : [2], 'vect__stop_words' : ['english'],
                    'vect__lowercase' : [True], 'vect__norm' : ['l2'], 'vect__analyzer' : ['word'], 'vect__binary' : [True], 
                    'clf__kernel' : ['rbf'], 'clf__C' : [100], 'clf__gamma' : [0.01], 'clf__probability' : [True]} 
  grid_search = GridSearchCV(clf, parameters, n_jobs = -2, refit = True, cv = 10)
  grid_search.fit(corpus, labels)
  </code></pre>
  
  <p>My problem is that when using <code>grid_serach.predict_proba(new_doc)</code> and then wanting to find out what classes the probabilities corresponds to with <code>grid_search.classes_</code>, I get the following error:</p>
  
  <blockquote>
    <p>AttributeError: 'GridSearchCV' object has no attribute 'classes_'</p>
  </blockquote>
  
  <p>What have I missed? I thought that if the last "step" in the pipeline was a classifier, then the return of GridSearchCV is also a classifier. Hence one can use the attributes of that classifier, e.g. classes_.</p>