From 4ded6205680dc15bf04a2c79cf34375e3383ab25 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 8 Jan 2026 17:11:29 +0100 Subject: [PATCH] feat(quickadapter): add tol parameter and tune HPO ranges for NGBoost --- quickadapter/user_data/strategies/Utils.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 0fe4cf3..229e365 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -2366,22 +2366,25 @@ def get_optuna_study_model_parameters( } elif regressor == REGRESSORS[3]: # "ngboost" - # Parameter order: boosting -> tree structure -> sampling -> distribution + # Parameter order: boosting -> tree structure -> sampling -> early stopping -> distribution default_ranges: dict[str, tuple[float, float]] = { # Boosting/Training - "n_estimators": (100, 1000), + "n_estimators": (200, 2000), "learning_rate": (0.001, 0.3), # Tree structure - "max_depth": (3, 8), + "max_depth": (2, 6), "min_samples_split": (2, 20), "min_samples_leaf": (1, 8), # Sampling "minibatch_frac": (0.6, 1.0), "col_sample": (0.4, 1.0), + # Early stopping + "tol": (1e-5, 1e-3), } log_scaled_params = { "n_estimators", "learning_rate", + "tol", } ranges = _build_ranges(default_ranges, log_scaled_params) @@ -2418,6 +2421,13 @@ def get_optuna_study_model_parameters( ranges["col_sample"][0], ranges["col_sample"][1], ), + # Early stopping + "tol": trial.suggest_float( + "tol", + ranges["tol"][0], + ranges["tol"][1], + log=True, + ), # Distribution "dist": trial.suggest_categorical("dist", ["normal", "lognormal"]), } -- 2.53.0