Skip to content

Instantly share code, notes, and snippets.

@abhishek-shrm
Last active May 6, 2020 02:16
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 abhishek-shrm/6e686f8d99019ece37e0b2089e7281c6 to your computer and use it in GitHub Desktop.
Save abhishek-shrm/6e686f8d99019ece37e0b2089e7281c6 to your computer and use it in GitHub Desktop.
# Building  Random Forest Classifier
from sklearn.ensemble import RandomForestClassifier
rfc = RandomForestClassifier(criterion = 'entropy', random_state = 42)
rfc.fit(X_train, Y_train)
# Evaluating on Training set
rfc_pred_train = rfc.predict(X_train)
print('Training Set Evaluation F1-Score=>',f1_score(Y_train,rfc_pred_train))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment