Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix quantile detector when low/high threshold are the same #1553

Merged
merged 10 commits into from
Feb 16, 2023
4 changes: 2 additions & 2 deletions darts/ad/detectors/threshold_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def _prep_thresholds(q):
raise_if_not(
all(
[
l < h
l <= h
for (l, h) in zip(self.low_threshold, self.high_threshold)
if ((l is not None) and (h is not None))
]
),
"all values in `low_threshold` must be lower than their corresponding value in `high_threshold`.",
"all values in `low_threshold` must be lower or equal than their corresponding value in `high_threshold`.",
julien12234 marked this conversation as resolved.
Show resolved Hide resolved
)

def _detect_core(self, series: TimeSeries) -> TimeSeries:
Expand Down