Last active
July 12, 2022 23:27
-
-
Save dakshtrehan/4bc78644e2a376c1360d8371add41682 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 | |
rf = RandomForestClassifier(n_estimator = 10, criterion = "entropy", max_depth = "5") | |
rf.fit(X_Train, Y_Train) | |
rf.score(X_Train, Y_Train) | |
rf.score(X_Train, Y_Train) | |
y_pred = rf.predict(X_Test) | |
#n_estimator = number of trees used in Random Forest(hyperparameter) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment