SHARE
TWEET

Untitled

a guest Jul 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #get data for classification task
  2. X_train, X_val, y_train, y_val = get_split_data(german_cred, target_name='bad_credit')
  3.  
  4. #Train and fit these models
  5. rand_forest_cf.fit(X_train, y_train)
  6. extra_tree_cf.fit(X_train, y_train)
  7. bagging_meta_cf.fit(X_train, y_train)
  8.  
  9. #check their performance
  10. print("ACC of Random Forest is : ", get_acc(rand_forest_cf.predict(X_val), y_val))
  11. print("ACC of Extra Trees is : ", get_acc(extra_tree_cf.predict(X_val), y_val))
  12. print("ACC of Bagging estimator is : ", get_acc(bagging_meta_cf.predict(X_val), y_val))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top