From: Jérôme Benoit Date: Wed, 16 Jul 2025 19:04:00 +0000 (+0200) Subject: refactor(qav3): reorder extrema plotting X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=38f51caf689cd7448f43704b535567f3c09f8489;p=freqai-strategies.git refactor(qav3): reorder extrema plotting Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index 431238a..12519a5 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -25,8 +25,8 @@ debug = False TEST_SIZE = 0.1 EXTREMA_COLUMN = "&s-extrema" -MINIMA_THRESHOLD_COLUMN = "&s-minima_threshold" MAXIMA_THRESHOLD_COLUMN = "&s-maxima_threshold" +MINIMA_THRESHOLD_COLUMN = "&s-minima_threshold" warnings.simplefilter(action="ignore", category=FutureWarning) @@ -518,7 +518,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel): label_period_candles: int, ) -> tuple[float, float]: temperature = float( - self.freqai_info.get("prediction_thresholds_temperature", 250.0) + self.freqai_info.get("prediction_thresholds_temperature", 280.0) ) extrema = pred_df.get(EXTREMA_COLUMN).iloc[ -( diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 5220abb..e965da9 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -41,8 +41,8 @@ debug = False logger = logging.getLogger(__name__) EXTREMA_COLUMN = "&s-extrema" -MINIMA_THRESHOLD_COLUMN = "&s-minima_threshold" MAXIMA_THRESHOLD_COLUMN = "&s-maxima_threshold" +MINIMA_THRESHOLD_COLUMN = "&s-minima_threshold" class QuickAdapterV3(IStrategy): @@ -109,9 +109,9 @@ class QuickAdapterV3(IStrategy): "train_rmse": {"color": "#a3087a", "type": "line"}, }, "extrema": { + MAXIMA_THRESHOLD_COLUMN: {"color": "#e6be0b", "type": "line"}, EXTREMA_COLUMN: {"color": "#f53580", "type": "line"}, MINIMA_THRESHOLD_COLUMN: {"color": "#4ae747", "type": "line"}, - MAXIMA_THRESHOLD_COLUMN: {"color": "#e6be0b", "type": "line"}, }, "min_max": { "maxima": {"color": "#0dd6de", "type": "bar"},