Created
July 10, 2019 12:13
-
-
Save risenW/2258d289442406f6fdfdd000e6734460 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 regression task | |
X_train, X_val, y_train, y_val = get_split_data(german_cred, target_name='age_yrs') | |
#Train and fit these models | |
rand_forest_reg.fit(X_train, y_train) | |
extra_tree_reg.fit(X_train, y_train) | |
bagging_meta_reg.fit(X_train, y_train) | |
#check their performance | |
print("MAE of Random Forest is : ", get_mae(rand_forest_reg.predict(X_val), y_val)) | |
print("MAE of Extra Trees is : ", get_mae(extra_tree_reg.predict(X_val), y_val)) | |
print("MAE of Bagging estimator is : ", get_mae(bagging_meta_reg.predict(X_val), y_val)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment