From: Jérôme Benoit Date: Thu, 8 Jan 2026 16:11:29 +0000 (+0100) Subject: feat(quickadapter): add tol parameter and tune HPO ranges for NGBoost X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4ded6205680dc15bf04a2c79cf34375e3383ab25;p=freqai-strategies.git feat(quickadapter): add tol parameter and tune HPO ranges for NGBoost --- 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"]), }