Skip to content

Commit

Permalink
chore(anomaly-detection) Disable peak-trough detection (#1150)
Browse files Browse the repository at this point in the history
Disabling peak-trough detection until its refined further
  • Loading branch information
ram-senth authored Sep 11, 2024
1 parent af40541 commit 374b782
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/seer/anomaly_detection/detectors/mp_scorers.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ def _adjust_flag_for_vicinity(
Time series subsequence that is used for teak-trough detection
"""
if flag == "anomaly_higher_confidence" or flag == "anomaly_lower_confidence":
[Q1, Q3] = np.quantile(context, [0.25, 0.75])
IQR = Q3 - Q1
threshold_lower = Q1 - (0 * IQR)
threshold_upper = Q3 + (0 * IQR)
# if ts_value > Q1 and ts_value < Q3:
if ts_value >= threshold_lower and ts_value <= threshold_upper:
flag = "anomaly_lower_confidence"
else:
flag = "anomaly_higher_confidence"
# if flag == "anomaly_higher_confidence" or flag == "anomaly_lower_confidence":
# [Q1, Q3] = np.quantile(context, [0.25, 0.75])
# IQR = Q3 - Q1
# threshold_lower = Q1 - (0 * IQR)
# threshold_upper = Q3 + (0 * IQR)
# # if ts_value > Q1 and ts_value < Q3:
# if ts_value >= threshold_lower and ts_value <= threshold_upper:
# flag = "anomaly_lower_confidence"
# else:
# flag = "anomaly_higher_confidence"
return flag

0 comments on commit 374b782

Please sign in to comment.