added comments
This commit is contained in:
parent
e44a9c19fc
commit
0c5dd298ed
1 changed files with 13 additions and 0 deletions
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
This is a test to detect outlier in Guest KPI metrics.
|
||||
It uses the standard deviation of the values in a
|
||||
set number of days for all specified metrics
|
||||
*/
|
||||
-- Add here the metrics you want to check for outliers
|
||||
-- (metrics that are cumulative or count-based)
|
||||
{% set metric_names = (
|
||||
"created_guest_journeys_not_cancelled",
|
||||
"started_guest_journeys_not_cancelled",
|
||||
|
|
@ -24,7 +31,13 @@
|
|||
"py_checkin_cover_fees_in_gbp",
|
||||
"py_total_guest_payments_in_gbp",
|
||||
) %}
|
||||
-- Set the number of standard deviations (sigma) allowed
|
||||
-- for a value to be considered an outlier.
|
||||
-- Values beyond this threshold from the average are flagged
|
||||
-- as outliers.
|
||||
{% set sigma_threshold = var("sigma_threshold", 3) %}
|
||||
-- Set the number of previous days' data (e.g., 14 days) to
|
||||
-- calculate the average and standard deviation for comparison.
|
||||
{% set days_to_consider = 14 %}
|
||||
{% set yesterday = "(current_date - interval '1 day')" %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue