From 47e034d2032c0e369024caec681ff72a11d9023c Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Sat, 20 Aug 2022 07:43:06 -0700 Subject: [PATCH] LightGBM notebook update (#690) * version update in notebook * comment about optuna install * monotone constraints --- notebook/automl_lightgbm.ipynb | 3 ++- website/docs/Use-Cases/Task-Oriented-AutoML.md | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/notebook/automl_lightgbm.ipynb b/notebook/automl_lightgbm.ipynb index 41610a31e..3b76e39c0 100644 --- a/notebook/automl_lightgbm.ipynb +++ b/notebook/automl_lightgbm.ipynb @@ -39,7 +39,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install flaml[notebook]==1.0.8" + "%pip install flaml[notebook]==1.0.10" ] }, { @@ -651,6 +651,7 @@ "metadata": {}, "outputs": [], "source": [ + "# uncomment the following line if optuna is not installed\n", "# %pip install optuna==2.8.0" ] }, diff --git a/website/docs/Use-Cases/Task-Oriented-AutoML.md b/website/docs/Use-Cases/Task-Oriented-AutoML.md index 6752de7eb..de7c11820 100644 --- a/website/docs/Use-Cases/Task-Oriented-AutoML.md +++ b/website/docs/Use-Cases/Task-Oriented-AutoML.md @@ -281,7 +281,9 @@ Some constraints on the estimator can be implemented via the custom learner. For class MonotonicXGBoostEstimator(XGBoostSklearnEstimator): @classmethod def search_space(**args): - return super().search_space(**args).update({"monotone_constraints": "(1, -1)"}) + space = super().search_space(**args) + space.update({"monotone_constraints": {"domain": "(1, -1)"}}) + return space ``` It adds a monotonicity constraint to XGBoost. This approach can be used to set any constraint that is an argument in the underlying estimator's constructor.