]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
feat(quickadapter): add boosting_type and leaf_estimation_method to CatBoost HPO
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 8 Jan 2026 15:16:04 +0000 (16:16 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 8 Jan 2026 15:16:04 +0000 (16:16 +0100)
quickadapter/user_data/strategies/Utils.py

index 9be9a73bab9529eae8bc9f95e821d667198fdf0a..16597613d5b3d8e00b021ba49afb05a386d7bf64 100644 (file)
@@ -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":