diff options
author | Vratko Polak <vrpolak@cisco.com> | 2018-04-24 14:27:30 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-04-25 13:09:01 +0000 |
commit | e9c0acf02ffe713d716d047b8c392c52c5093095 (patch) | |
tree | bdb57f1671b0b150c29db1eaa05cca3cf4f2d69d | |
parent | 213f165c2c5dad30584f76f2d2adb6978d25c20c (diff) |
CSIT-1041: Do not treat positive jumps as outliers
Change-Id: If6e65faae3b5a31c56f942a7975b5a35f5f6d6a4
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 0a8855adbb30a6079a538bea179a13988fdc20c0)
-rw-r--r-- | resources/tools/presentation/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/tools/presentation/utils.py b/resources/tools/presentation/utils.py index 4277aa0334..f118afca1d 100644 --- a/resources/tools/presentation/utils.py +++ b/resources/tools/presentation/utils.py @@ -123,9 +123,9 @@ def split_outliers(input_series, outlier_const=1.5, window=14): q1 = np.percentile(y_rolling_array, 25) q3 = np.percentile(y_rolling_array, 75) iqr = (q3 - q1) * outlier_const - low, high = q1 - iqr, q3 + iqr + low = q1 - iqr item_pd = pd.Series([item_y, ], index=[item_x, ]) - if low <= item_y <= high: + if low <= item_y: trimmed_data = trimmed_data.append(item_pd) else: outliers = outliers.append(item_pd) |