From bc7e8b839cce8ff369235d38c77a84a8a19f0cb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 8 Jan 2026 16:16:04 +0100 Subject: [PATCH] feat(quickadapter): add boosting_type and leaf_estimation_method to CatBoost HPO --- quickadapter/user_data/strategies/Utils.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 9be9a73..1659761 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -2402,7 +2402,7 @@ def get_optuna_study_model_parameters( # Tree structure "depth": (4, 12), "min_data_in_leaf": (1, 20), - "border_count": (32, 254), + "border_count": (128, 255), "max_ctr_complexity": (2, 6), # Regularization "l2_leaf_reg": (1, 10), @@ -2414,6 +2414,7 @@ def get_optuna_study_model_parameters( "subsample": (0.6, 1.0), } bootstrap_options = ["Bayesian", "Bernoulli"] + boosting_type_options = ["Plain"] else: # CPU default_ranges: dict[str, tuple[float, float]] = { # Boosting/Training @@ -2432,6 +2433,7 @@ def get_optuna_study_model_parameters( "subsample": (0.6, 1.0), } bootstrap_options = ["Bayesian", "Bernoulli", "MVS"] + boosting_type_options = ["Plain", "Ordered"] log_scaled_params = { "iterations", @@ -2442,10 +2444,14 @@ def get_optuna_study_model_parameters( ranges = _build_ranges(default_ranges, log_scaled_params) + boosting_type = trial.suggest_categorical( + "boosting_type", boosting_type_options + ) bootstrap_type = trial.suggest_categorical("bootstrap_type", bootstrap_options) params = { # Boosting/Training + "boosting_type": boosting_type, "iterations": _optuna_suggest_int_from_range( trial, "iterations", ranges["iterations"], min_val=1, log=True ), @@ -2490,6 +2496,9 @@ def get_optuna_study_model_parameters( ranges["rsm"][0], ranges["rsm"][1], ), + "leaf_estimation_method": trial.suggest_categorical( + "leaf_estimation_method", ["Newton", "Gradient"] + ), } if bootstrap_type == "Bayesian": -- 2.43.0