title: XGBClassifier fails when I pass early_stopping_rounds
body: <p>I am using <code>xgboost</code> in the following way:</p>
  
  <pre><code>from xgboost import XGBClassifier
  clf = XGBClassifier()
  clf = clf.fit(df_train, df_train_labels, verbose=True)
  </code></pre>
  
  <p>This works well. However, if I add an <code>early_stopping_rounds</code> parameter, like this:</p>
  
  <pre><code>clf = clf.fit(df_train, df_train_labels, early_stopping_rounds=10, verbose=True)
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;ipython-input-16-786925228ae5&gt; in &lt;module&gt;()
        9 
       10 
  ---&gt; 11 clf = clf.fit(df_train, df_train_labels, early_stopping_rounds=10, verbose=True)
       12 print("after fit")
       13 prediction = np.exp(clf.predict(df_test))
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/xgboost/sklearn.py in fit(self, X, y, sample_weight, eval_set, eval_metric, early_stopping_rounds, verbose)
      443                               early_stopping_rounds=early_stopping_rounds,
      444                               evals_result=evals_result, obj=obj, feval=feval,
  --&gt; 445                               verbose_eval=verbose)
      446 
      447         self.objective = xgb_options["objective"]
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/xgboost/training.py in train(params, dtrain, num_boost_round, evals, obj, feval, maximize, early_stopping_rounds, evals_result, verbose_eval, learning_rates, xgb_model, callbacks)
      203                            evals=evals,
      204                            obj=obj, feval=feval,
  --&gt; 205                            xgb_model=xgb_model, callbacks=callbacks)
      206 
      207 
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/xgboost/training.py in _train_internal(params, dtrain, num_boost_round, evals, obj, feval, xgb_model, callbacks)
       99                                end_iteration=num_boost_round,
      100                                rank=rank,
  --&gt; 101                                evaluation_result_list=evaluation_result_list))
      102         except EarlyStopException:
      103             break
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/xgboost/callback.py in callback(env)
      190     def callback(env):
      191         """internal function"""
  --&gt; 192         score = env.evaluation_result_list[-1][1]
      193         if len(state) == 0:
      194             init(env)
  
  IndexError: list index out of range
  </code></pre>
  
  <p>I looked this up and I saw that the <code>fit</code> method can be passed a multitude of parameters, so I don't believe that the fact that I added <code>early_stopping_rounds</code> should cause problems.</p>
  
  <p>Any idea what could be the cause of this error?</p>