aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_CPTA.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-04-20 14:23:11 +0200
committerTibor Frank <tifrank@cisco.com>2018-04-23 05:25:08 +0000
commit4f5872c1bb23873b3a93cb471aae8700d5ca029d (patch)
tree579500c580dd8fa90bc77a1aba76c7c895691246 /resources/tools/presentation/generator_CPTA.py
parentf3d66d9ca20e7fb2b153d83d809f005a93b76a8f (diff)
FIX: Use rolling window for outlier detection
+ Rename find_outliers to split_outliers. + Make remove_ouliers call split_outliers internally. + Add "window" argument to both functions. + Add TODOs to call sites not setting window size explicitly. + Improve docstrings. Change-Id: I24961e2859ddbfa62b543031284517c7389a2abb Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_CPTA.py')
-rw-r--r--resources/tools/presentation/generator_CPTA.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 25be09f959..3817ea9043 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -25,7 +25,7 @@ import numpy as np
import pandas as pd
from collections import OrderedDict
-from utils import find_outliers, archive_input_data, execute_command
+from utils import split_outliers, archive_input_data, execute_command
# Command to build the html format of the report
@@ -247,7 +247,8 @@ def _generate_trending_traces(in_data, build_info, period, moving_win_size=10,
data_pd = pd.Series(data_y, index=data_x)
- t_data, outliers = find_outliers(data_pd, outlier_const=1.5)
+ t_data, outliers = split_outliers(data_pd, outlier_const=1.5,
+ window=moving_win_size)
results = _evaluate_results(data_pd, t_data, window=moving_win_size)
anomalies = pd.Series()