diff --git a/tests/kpis_global_metrics_outlier_detection.sql b/tests/kpis_global_metrics_outlier_detection.sql index 9e8cd82..ce80f8d 100644 --- a/tests/kpis_global_metrics_outlier_detection.sql +++ b/tests/kpis_global_metrics_outlier_detection.sql @@ -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