Skip to content

Instantly share code, notes, and snippets.

@pplonski
Last active April 1, 2021 12:49
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 pplonski/6cde6dc79279886ab843298a1ecbb71f to your computer and use it in GitHub Desktop.
Save pplonski/6cde6dc79279886ab843298a1ecbb71f to your computer and use it in GitHub Desktop.
MLJAR AutoML modes
'''
MLJAR AutoML can work in 4 modes:
- Explain
- Perform
- Compete
- Optuna
'''
# training in Explain mode, perfect for data exploration
automl = AutoML(mode="Explain")
automl.fit(X, y)
# training in Perform mode, perfect for production-ready systems
# AutoML trained for 4 hours
automl = AutoML(mode="Perform", total_time_limit=4*3600)
automl.fit(X, y)
# training in Compete mode, perfect for high performing ML pipelines
automl = AutoML(mode="Compete", total_time_limit=4*3600)
automl.fit(X, y)
# training in Optuna mode, highly tune selected algorithm
automl = AutoML(
mode="Optuna",
algorithms=["CatBoost", "LightGBM", "Xgboost"],
optuna_time_budget=3600,
eval_metric="f1"
)
automl.fit(X, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment