-
-
Save BinarySpoon/0eafac8d93ff8532ccabc02f251db44c to your computer and use it in GitHub Desktop.
This file contains 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
# E.Analysing Results --> | |
# 1.Decision Tree Classifier --> | |
print("-----------------------------------") | |
print('Decision Tree Classifier') | |
print('Accuracy Score: {:,.2f}'.format(dtc.score(X_test, y_test))) | |
print() | |
print(classification_report(y_test, dtc.predict(X_test))) | |
print() | |
print('confusion_matrix: \n {}'.format(confusion_matrix(y_test, dtc.predict(X_test)))) | |
print() | |
print("-----------------------------------") | |
# 2.Random Forest Classifier --> | |
print("-----------------------------------") | |
print('Random Forest Classification') | |
print('Accuracy Score: {:,.2f}'.format(rf.score(X_test,y_test))) | |
print() | |
print(classification_report(y_test, rf.predict(X_test))) | |
print() | |
print('confusion_matrix: \n {}'.format(confusion_matrix(y_test,rf.predict(X_test)))) | |
print() | |
print("-----------------------------------") | |
# 3.Gradient Boosted regressor --> | |
print("-----------------------------------") | |
print('Gradient Booster') | |
print('Accuracy Score: {:,.2f}'.format(gbc.score(X_test, y_test))) | |
print() | |
print(classification_report(y_test, gbc.predict(X_test))) | |
print() | |
print('confusion_matrix: \n {}'.format(confusion_matrix(y_test, gbc.predict(X_test)))) | |
print() | |
print("-----------------------------------") | |
# 4.Support Vector classification --> | |
print("-----------------------------------") | |
print('Support Vector Machine') | |
print('Accuracy score: {:,.2f}'.format(svc.score(X_test,y_test))) | |
print() | |
print(classification_report(y_test, svc.predict(X_test))) | |
print() | |
print('confusion_matrix: \n {}'.format(confusion_matrix(y_test,svc.predict(X_test)))) | |
print() | |
print("-----------------------------------") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment