]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
perf(quickadapter): optimize Optuna log scale for LightGBM and CatBoost hyperparameters
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 8 Jan 2026 11:49:39 +0000 (12:49 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 8 Jan 2026 11:49:39 +0000 (12:49 +0100)
Apply logarithmic sampling scale to regularization and tree complexity parameters for improved hyperparameter search efficiency:

- LightGBM: Add num_leaves to log scale (exponential tree growth)
- CatBoost: Add l2_leaf_reg and random_strength to log scale (multiplicative effects)
- Reverted bagging_temperature to linear scale (0 has special meaning: disables Bayesian bootstrap)

Log scale provides better exploration in low-value regions where these parameters have the most impact, consistent with Optuna best practices and industry standards (FLAML, XGBoost patterns).

Bump version to 3.10.6

quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/QuickAdapterV3.py
quickadapter/user_data/strategies/Utils.py

index a8b49b5ca6b344bc9fd9c36f98c45860913f2b64..1c3cec237ed0edbc23ae1c1563267dd2011bc4d4 100644 (file)
@@ -87,7 +87,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.10.5"
+    version = "3.10.6"
 
     _TEST_SIZE: Final[float] = 0.1
 
index 7f477619af045ada6c12fce7ac6e5d0815d109bb..3ed132f4706b6a4df78622d8c4743b4bea3e664e 100644 (file)
@@ -110,7 +110,7 @@ class QuickAdapterV3(IStrategy):
     _PLOT_EXTREMA_MIN_EPS: Final[float] = 0.01
 
     def version(self) -> str:
-        return "3.10.5"
+        return "3.10.6"
 
     timeframe = "5m"
     timeframe_minutes = timeframe_to_minutes(timeframe)
index a4e00bf72567c0c2a723b4f587cb420bd8abddee..9be9a73bab9529eae8bc9f95e821d667198fdf0a 100644 (file)
@@ -1612,7 +1612,9 @@ def zigzag(
     )
 
 
-Regressor = Literal["xgboost", "lightgbm", "histgradientboostingregressor", "ngboost", "catboost"]
+Regressor = Literal[
+    "xgboost", "lightgbm", "histgradientboostingregressor", "ngboost", "catboost"
+]
 REGRESSORS: Final[tuple[Regressor, ...]] = (
     "xgboost",
     "lightgbm",
@@ -2163,6 +2165,7 @@ def get_optuna_study_model_parameters(
         log_scaled_params = {
             "n_estimators",
             "learning_rate",
+            "num_leaves",
             "min_child_weight",
             "min_split_gain",
             "reg_alpha",
@@ -2184,7 +2187,7 @@ def get_optuna_study_model_parameters(
             ),
             # Tree structure
             "num_leaves": _optuna_suggest_int_from_range(
-                trial, "num_leaves", ranges["num_leaves"], min_val=2
+                trial, "num_leaves", ranges["num_leaves"], min_val=2, log=True
             ),
             # Leaf constraints
             "min_child_weight": trial.suggest_float(
@@ -2433,6 +2436,8 @@ def get_optuna_study_model_parameters(
         log_scaled_params = {
             "iterations",
             "learning_rate",
+            "l2_leaf_reg",
+            "random_strength",
         }
 
         ranges = _build_ranges(default_ranges, log_scaled_params)
@@ -2462,7 +2467,10 @@ def get_optuna_study_model_parameters(
             ),
             # Regularization
             "l2_leaf_reg": trial.suggest_float(
-                "l2_leaf_reg", ranges["l2_leaf_reg"][0], ranges["l2_leaf_reg"][1]
+                "l2_leaf_reg",
+                ranges["l2_leaf_reg"][0],
+                ranges["l2_leaf_reg"][1],
+                log=True,
             ),
             "model_size_reg": trial.suggest_float(
                 "model_size_reg",
@@ -2475,6 +2483,7 @@ def get_optuna_study_model_parameters(
                 "random_strength",
                 ranges["random_strength"][0],
                 ranges["random_strength"][1],
+                log=True,
             ),
             "rsm": trial.suggest_float(
                 "rsm",