From 1046b0d3038e6ae27e0586823c13cc13cc184a8b Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 31 May 2019 20:22:03 +0300 Subject: [PATCH] Swap bounds in anomaly detector #683 (#685) --- analytics/analytics/detectors/anomaly_detector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analytics/analytics/detectors/anomaly_detector.py b/analytics/analytics/detectors/anomaly_detector.py index b7a45c7..c72f3a7 100644 --- a/analytics/analytics/detectors/anomaly_detector.py +++ b/analytics/analytics/detectors/anomaly_detector.py @@ -201,9 +201,9 @@ class AnomalyDetector(ProcessingDetector): # TODO: support multiple segments timestamps = utils.convert_series_to_timestamp_list(dataframe.timestamp) - upper_bound_timeseries = list(zip(timestamps, upper_bound.values.tolist())) lower_bound_timeseries = list(zip(timestamps, lower_bound.values.tolist())) - result = AnomalyProcessingResult(upper_bound_timeseries, lower_bound_timeseries) + upper_bound_timeseries = list(zip(timestamps, upper_bound.values.tolist())) + result = AnomalyProcessingResult(lower_bound_timeseries, upper_bound_timeseries) return result def add_season_to_data(self, data: pd.Series, segment: pd.Series, offset: int, seasonality: int, addition: bool) -> pd.Series: