@@ -200,7 +200,7 @@ def apply(self, objective: Equation, arguments: dict, force_out_of_place: bool =
200200 for start_idx in range (0 , num_horizons , step_size ):
201201 end_idx = start_idx + window_size
202202 target_window = target_vals [start_idx :end_idx ]
203- if np .isclose (np .sqrt (np .mean (np .power (_ , 2 ))), 0 , atol = 1e-10 ):
203+ if np .isclose (np .sqrt (np .mean (np .power (target_window , 2 ))), 0 , atol = 1e-10 ):
204204 window_stability = np .abs (np .std (target_window ))
205205 else :
206206 window_stability = np .abs (np .std (target_window ) / np .sqrt (np .mean (np .power (target_window , 2 ))))
@@ -241,7 +241,7 @@ def apply(self, objective: Equation, arguments: dict, force_out_of_place: bool =
241241 target_window = target_vals [start_idx :end_idx , :].reshape (- 1 )
242242 else :
243243 target_window = target_vals [:, start_idx :end_idx ].reshape (- 1 )
244- if np .isclose (np .sqrt (np .mean (np .power (_ , 2 ))), 0 , atol = 1e-10 ):
244+ if np .isclose (np .sqrt (np .mean (np .power (target_window , 2 ))), 0 , atol = 1e-10 ):
245245 window_stability = np .abs (np .std (target_window ))
246246 else :
247247 window_stability = np .abs (np .std (target_window ) / np .sqrt (np .mean (np .power (target_window , 2 ))))
@@ -285,7 +285,7 @@ def apply(self, objective: Equation, arguments: dict, force_out_of_place: bool =
285285 target_window = target_vals [:, start_idx :end_idx , :].reshape (- 1 )
286286 else :
287287 target_window = target_vals [:, :, start_idx :end_idx ].reshape (- 1 )
288- if np .isclose (np .sqrt (np .mean (np .power (_ , 2 ))), 0 , atol = 1e-10 ):
288+ if np .isclose (np .sqrt (np .mean (np .power (target_window , 2 ))), 0 , atol = 1e-10 ):
289289 window_stability = np .abs (np .std (target_window ))
290290 else :
291291 window_stability = np .abs (np .std (target_window ) / np .sqrt (np .mean (np .power (target_window , 2 ))))
0 commit comments