Kaggle competition: Santander Customer Satisfaction
print("Final Loss on the testing set: {0:f}".format(loss_score5))<define_variables>
X_fit, X_eval, y_fit, y_eval= cv.train_test_split(X, y, test_size=0.3)
 clf = xgb.XGBClassifier(missing=np.nan, max_depth=5, n_estimators=570, learning_rate=0.02, nthread=4, subsample=0.68, colsample_bytree=0.7, seed=1235)
 clf.fit(X, y, early_stopping_rounds=500, eval_metric="auc", eval_set=[(X_eval, y_eval)])
<save_to_csv><EOS> 
print('Overall AUC:', metrics.roc_auc_score(y, clf.predict_proba(X)[:,1]))
X_test = test_dataset[feature_names]
y_pred= clf.predict_proba(X_test)[:,1]
submission = pd.DataFrame({"ID":X_test.index, "TARGET":y_pred})
 submission.to_csv("submission.csv", index=False)