Created
March 11, 2021 00:30
-
-
Save zero731/e1b96e64511991295b8dcfd502abb7d2 to your computer and use it in GitHub Desktop.
fit and evaluate random forest classifier for example churn analysis
This file contains 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
## Instantiate random forest classifier | |
rf = RandomForestClassifier(random_state=random_seed, | |
n_jobs=-1) | |
## Fit random forest classifier to training data | |
rf.fit(X_train_tf, y_train) | |
## Evaluate how the model performs on the test set | |
eval_clf(rf, X_test_tf, y_test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment