text_html_output_1.png
from sklearn.model_selection import cross_val_score

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import xgboost

train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')

y_train = train.y

train = train.iloc[:, 1:15]
test = test.iloc[:, 1:15]

des = pd.concat((train, test))

des = pd.get_dummies(des)
X_train = des.iloc[0:32967, :]
X_test = des.iloc[32967:41188, :]

classifier = xgboost.XGBClassifier()

classifier = xgboost.XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1, colsample_bynode=1, colsample_bytree=0.3, gamma=0.4, learning_rate=0.1, max_delta_step=0, max_depth=8, min_child_weight=3, missing=None, n_estimators=10, n_jobs=1, nthread=None, objective='binary:logistic', random_state=0, reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None, silent=None, subsample=1, verbosity=1)

from sklearn.model_selection import cross_val_score
score = cross_val_score(classifier, X_train, y_train, cv=5)

score.mean()