Modifying strenght by tolerance to clarify naming

This commit is contained in:
uri 2024-09-06 09:15:33 +02:00
parent 0f73b70942
commit cb8beab129

View file

@ -58,10 +58,11 @@ point it becomes too sensitive, just adapt the following parameters.
{% set start_validating_on_this_day_month = 2 %}
-- Specify here the strength of the detector. A higher value
-- means that this test will allow for more variance to be accepted.
-- means that this test will allow for more variance to be accepted,
-- thus it will be more tolerant.
-- A lower value means that the chances of detecting outliers
-- and false positives will be higher. Recommended around 10.
{% set detector_strength = 10 %}
{% set detector_tolerance = 10 %}
-- Specify here the number of days in the past that will be used
-- to compare against. Keep in mind that we only keep the daily
@ -106,11 +107,11 @@ with
stddev(abs_daily_value) as std_daily_value_previous_dates,
greatest(
avg(abs_daily_value)
- {{ detector_strength }} * stddev(abs_daily_value),
- {{ detector_tolerance }} * stddev(abs_daily_value),
0
) as lower_bound,
avg(abs_daily_value)
+ {{ detector_strength }} * stddev(abs_daily_value) as upper_bound
+ {{ detector_tolerance }} * stddev(abs_daily_value) as upper_bound
from metric_data
where is_max_date = 0
group by 1