title: Calibration with xgboost
body: <p>I'm wondering if I can do calibration in xgboost. To be more specific, does xgboost come with an existing calibration implementation like in scikit-learn, or are there some ways to put the model from xgboost into a scikit-learn's CalibratedClassifierCV? </p>
  
  <p>As far as I know in sklearn this is the common procedure:</p>
  
  <pre><code># Train random forest classifier, calibrate on validation data and evaluate
  # on test data
  clf = RandomForestClassifier(n_estimators=25)
  clf.fit(X_train, y_train)
  clf_probs = clf.predict_proba(X_test)
  sig_clf = CalibratedClassifierCV(clf, method="sigmoid", cv="prefit")
  sig_clf.fit(X_valid, y_valid)
  sig_clf_probs = sig_clf.predict_proba(X_test)
  sig_score = log_loss(y_test, sig_clf_probs)
  print "Calibrated score is ",sig_score
  </code></pre>
  
  <p>If I put an xgboost tree model into the CalibratedClassifierCV an error will be thrown (of course):</p>
  
  <p><code>RuntimeError: classifier has no decision_function or predict_proba method.</code></p>
  
  <p>Is there a way to integrate the excellent calibration module of scikit-learn with xgboost?</p>
  
  <p>Appreciate your insightful ideas!</p>