text_html_output_1.png
from sklearn.metrics import accuracy_score

import xgboost as xgb

import xgboost as xgb
model = xgb.XGBClassifier()
model.fit(X_train, y_train)
model.save_model('model.bst')

y_pred = model.predict(X_test)
predictions = [round(value) for value in y_pred]
accuracy = accuracy_score(y_test, predictions)
print('Accuracy: %.2f%%' % (accuracy * 100.0))