From 0c14df576e03112b5f6c84937f9b1b0b002a8b04 Mon Sep 17 00:00:00 2001 From: rozetko Date: Thu, 7 Jun 2018 18:06:35 +0300 Subject: [PATCH] tmp step_size fix in step_detector --- analytics/step_detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics/step_detector.py b/analytics/step_detector.py index d2ce685..90d761a 100644 --- a/analytics/step_detector.py +++ b/analytics/step_detector.py @@ -138,7 +138,7 @@ class StepDetector: self.__optimize_threshold(data, self.window_size, segments, contamination) def __optimize_threshold(self, data, window_size, segments, contamination): - step_size = window_size // 2 + step_size = 3 pattern = np.concatenate([[-1] * step_size, [1] * step_size]) corr_res = np.correlate(data, pattern, mode='same') / window_size corr_res = np.concatenate((np.zeros(step_size), corr_res, np.zeros(step_size)))