Last active
March 31, 2020 01:23
-
-
Save karamanbk/b7b2497ee8e9f61b31265c1359199b82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#XGBoost Multiclassification Model | |
ltv_xgb_model = xgb.XGBClassifier(max_depth=5, learning_rate=0.1,objective= 'multi:softprob',n_jobs=-1).fit(X_train, y_train) | |
print('Accuracy of XGB classifier on training set: {:.2f}' | |
.format(ltv_xgb_model.score(X_train, y_train))) | |
print('Accuracy of XGB classifier on test set: {:.2f}' | |
.format(ltv_xgb_model.score(X_test[X_train.columns], y_test))) | |
y_pred = ltv_xgb_model.predict(X_test) | |
print(classification_report(y_test, y_pred)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment