title: XGBoost Best Iteration
body: <p>I am running a regression using the XGBoost Algorithm as,</p>
  
  <pre><code>clf = XGBRegressor(eval_set = [(X_train, y_train), (X_val, y_val)],
                         early_stopping_rounds = 10, 
                         n_estimators = 10,                    
                         verbose = 50)
  
  clf.fit(X_train, y_train, verbose=False)
  print("Best Iteration: {}".format(clf.booster().best_iteration))
  </code></pre>
  
  <p>It correctly trains itself, but the print function raises the following error,</p>
  
  <pre><code>TypeError: 'str' object is not callable
  </code></pre>
  
  <p>How can I get the number of the <strong>best</strong> <strong>iteration</strong> of the model?</p>
  
  <p>Furthermore, how can I print the <strong>training</strong> <strong>error</strong> of <strong>each</strong> <strong>round</strong>?</p>