title: Fitting VotingClassifier
body: <p>I'm learning scikit-learn. I've been trying to optimise a classifier for a particular task where performance is judges by log loss. I'm trying to check if a VotingClassifier() can improve my performance using my two best performing classifiers.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>estimators = [RandomForestClassifier(random_state=0,n_estimators=500,bootstrap=False,criterion='entropy',
                                               max_depth=None,max_features='auto'),
                        LogisticRegression(solver='lbfgs',C=opt_c)]
          vc = VotingClassifier(estimators=estimators,voting='soft',weights=[1,1])
          vc.fit(X_train_std,y_train.as_matrix())
          vcp = vc.predict_proba(X_valid_std)
          print('Score: {}\tLog Loss: {}'.format(vc.score(X_valid_std,y_valid),log_loss(y_valid,vcp)))
  </code></pre>
  
  <p>However, when I try to run this code, I get the following error:</p>
  
  <pre><code>    ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-123-8cd305ba77b8&gt; in &lt;module&gt;()
  ----&gt; 1 vc.fit(X_train_std,y_train.as_matrix())
  
  /afs/-omited-/miniconda2/envs/iaml/lib/python2.7/site-packages/sklearn/ensemble/voting_classifier.pyc in fit(self, X, y, sample_weight)
      170                     raise ValueError('Underlying estimator \'%s\' does not'
      171                                      ' support sample weights.' % name)
  --&gt; 172         names, clfs = zip(*self.estimators)
      173         self._validate_names(names)
      174 
  
  /afs/-ommited-/miniconda2/envs/iaml/lib/python2.7/site-packages/sklearn/ensemble/base.pyc in __iter__(self)
      145     def __iter__(self):
      146         """Returns iterator over estimators in the ensemble."""
  --&gt; 147         return iter(self.estimators_)
      148 
      149 
  
  AttributeError: 'RandomForestClassifier' object has no attribute 'estimators_'
  </code></pre>
  
  <p>Can someone explkain why this is happening?</p>