Created
February 3, 2019 21:05
-
-
Save terrah27/8608fe865457eec519f75f4a7ea169b6 to your computer and use it in GitHub Desktop.
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
from sklearn.ensemble import RandomForestClassifier | |
# train model | |
rfc = RandomForestClassifier(n_estimators=10).fit(X_train, y_train) | |
# predict on test set | |
rfc_pred = rfc.predict(X_test) | |
accuracy_score(y_test, rfc_pred) | |
0.9995 | |
f1_score(y_test, rfc_pred) | |
0.8666 | |
recall_score(y_test, rfc_pred) | |
0.7878 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment