Skip to content

Instantly share code, notes, and snippets.

@afcotroneo
Last active January 4, 2022 19:11
Show Gist options
  • Select an option

  • Save afcotroneo/9c9f57804c75f5000925975b874e4c74 to your computer and use it in GitHub Desktop.

Select an option

Save afcotroneo/9c9f57804c75f5000925975b874e4c74 to your computer and use it in GitHub Desktop.
with mlflow.start_run(run_name="Random_Forest_Undercount"):
from sklearn.ensemble import RandomForestRegressor
# model parameters
params = {'n_estimators': 1000, 'random_state': 41}
# log model params
for key in params:
mlflow.log_param(key, params[key])
# train Random Forest model
RFtree = RandomForestRegressor(**params)
RFtree.fit(train_features, train_labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment