Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-1041: Do not treat positive jumps as outliers
[csit.git]
/
resources
/
tools
/
presentation
/
utils.py
diff --git
a/resources/tools/presentation/utils.py
b/resources/tools/presentation/utils.py
index
4277aa0
..
f118afc
100644
(file)
--- 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
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, ])
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)
trimmed_data = trimmed_data.append(item_pd)
else:
outliers = outliers.append(item_pd)