Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #tuning the hyperparameters
- for n_trees in np.arange(10,160,20):
- rfc = RandomForestClassifier(n_estimators = n_trees)
- rfc_cv_scores = cross_val_score(rfc, x_train, y_train, cv=8)
- print("CV with {} trees:".format(n_trees))
- print(rfc_cv_scores)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement