Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement