]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(qav3): cleanup pivot labeling defaults handling
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 17 May 2025 12:53:07 +0000 (14:53 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 17 May 2025 12:53:07 +0000 (14:53 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/Utils.py

index a808420fc64bec4541a663f25dfcd87d214bfa0c..80b44a83e30528ad74bcad7f2149e1eced897dd6 100644 (file)
@@ -884,8 +884,8 @@ def zigzag(
 
     def calculate_depth(
         pivots_indices: list[int],
-        min_depth: int = 6,
-        max_depth: int = 24,
+        min_depth: int = int(initial_depth / 2),
+        max_depth: int = initial_depth * 2,
         depth_scaling_factor: float = 0.75,
     ) -> int:
         if len(pivots_indices) < 2:
index 3c106fb9f9ca290394202537606b319e6c0b15a8..78e126981c1566d56e8afbf6133a087616933ff0 100644 (file)
@@ -380,8 +380,8 @@ def zigzag(
 
     def calculate_depth(
         pivots_indices: list[int],
-        min_depth: int = 6,
-        max_depth: int = 24,
+        min_depth: int = int(initial_depth / 2),
+        max_depth: int = initial_depth * 2,
         depth_scaling_factor: float = 0.75,
     ) -> int:
         if len(pivots_indices) < 2: