Przeglądaj źródła

modify: 调整单调判断函数。

wangzhaoyang 4 miesięcy temu
rodzic
commit
c72980a316
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      feature/feature_utils.py

+ 2 - 0
feature/feature_utils.py

@@ -86,6 +86,8 @@ def f_judge_monto(bd_list: list, pos_neg_cnt: int = 1) -> int:
         else:
             # 记录一次符号变化
             pos_neg_flag += 1
+            if pos_neg_flag > pos_neg_cnt:
+                return False
     # 记录满足趋势要求的变量
     if pos_neg_flag <= pos_neg_cnt:
         return True