From: Jérôme Benoit Date: Fri, 14 Mar 2025 10:54:38 +0000 (+0100) Subject: perf(qav3): fine tune label window optimization X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=850bd161723764120c6f7c6319d7705598250bfa;p=freqai-strategies.git perf(qav3): fine tune label window optimization Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py index b02c148..366d01c 100644 --- a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py @@ -588,7 +588,10 @@ def period_objective( max_label_period_candles, step=candles_step, ) - label_window: int = label_period_candles * 2 + label_period_frequency: int = int( + fit_live_predictions_candles / label_period_candles + ) + label_window: int = label_period_candles * label_period_frequency y_test = y_test.iloc[-label_window:].to_numpy() test_weights = test_weights[-label_window:] y_pred = y_pred[-label_window:] diff --git a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py index 54f5c4f..8d5926a 100644 --- a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py @@ -596,7 +596,10 @@ def period_objective( max_label_period_candles, step=candles_step, ) - label_window: int = label_period_candles * 2 + label_period_frequency: int = int( + fit_live_predictions_candles / label_period_candles + ) + label_window: int = label_period_candles * label_period_frequency y_test = y_test.iloc[-label_window:].to_numpy() test_weights = test_weights[-label_window:] y_pred = y_pred[-label_window:]