From 9591f747f9468c8a9738c29d24e3663b4ad302c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 24 May 2026 02:00:58 +0200 Subject: [PATCH] feat(weights): add _strip_label_weight_columns helper for find_labels collision avoidance --- .../freqaimodels/QuickAdapterRegressorV3.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index f644f3f..661bce1 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -102,6 +102,18 @@ class QuickAdapterRegressorV3(BaseRegressionModel): _TEST_SIZE: Final[float] = 0.1 + _LABEL_WEIGHT_SUFFIX: Final[str] = "_weight" + + @staticmethod + def _label_weight_column_name(label_col: str) -> str: + return f"{label_col}{QuickAdapterRegressorV3._LABEL_WEIGHT_SUFFIX}" + + def _strip_label_weight_columns(self, dk: FreqaiDataKitchen) -> None: + dk.label_list = [ + c for c in dk.label_list + if not c.endswith(self._LABEL_WEIGHT_SUFFIX) + ] + _SQRT_2: Final[float] = np.sqrt(2.0) _OPTUNA_LABEL_N_OBJECTIVES: Final[int] = 7 -- 2.53.0