Skip to content

Instantly share code, notes, and snippets.

@shayaf84
Last active September 29, 2021 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayaf84/9921980bb7a709c8d5bd1564a031cee5 to your computer and use it in GitHub Desktop.
Save shayaf84/9921980bb7a709c8d5bd1564a031cee5 to your computer and use it in GitHub Desktop.
#Random Forest Classifier
rf = RandomForestClassifier(n_estimators = 15,random_state=42)
rf.fit(X_train, y_train)
y_pred = rf.predict(X_test)
precision = precision_score(y_test, y_pred)
recall = recall_score(y_test, y_pred)
f1 = f1_score(y_test, y_pred)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment