Created
July 10, 2019 13:07
-
-
Save risenW/409ddbcba7202e050f33c88a50b5a6e8 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
#get data for classification task | |
X_train, X_val, y_train, y_val = get_split_data(german_cred, target_name='bad_credit') | |
#Train and fit these models | |
rand_forest_cf.fit(X_train, y_train) | |
extra_tree_cf.fit(X_train, y_train) | |
bagging_meta_cf.fit(X_train, y_train) | |
#check their performance | |
print("ACC of Random Forest is : ", get_acc(rand_forest_cf.predict(X_val), y_val)) | |
print("ACC of Extra Trees is : ", get_acc(extra_tree_cf.predict(X_val), y_val)) | |
print("ACC of Bagging estimator is : ", get_acc(bagging_meta_cf.predict(X_val), y_val)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment