Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Last active November 13, 2018 18:59
Show Gist options
  • Save WillKoehrsen/69cc0cd9ed54650a0e94d2bd73fd9c1c to your computer and use it in GitHub Desktop.
Save WillKoehrsen/69cc0cd9ed54650a0e94d2bd73fd9c1c to your computer and use it in GitHub Desktop.
from sklearn.ensemble import RandomForestClassifier
# Create the model with 100 trees and default hyperparameters
model = RandomForestClassifier(n_estimators=100)
# Fit on training data
model.fit(train, train_labels)
# Make predictions on holdout test data
predictions = model.predict(test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment