Expect the daily sums of the given column to be close to the average sums calculated 4 weeks back.
expect_day_sum_to_be_close_to_equivalent_week_day_mean
This expectation level is BETA
Description
Expect the daily sums of the given column to be close to the average sums calculated 4 weeks back.
This metric expects daily sums of the given column, to be close to the average sums calculated 4 weeks back,
respective to the specific day of the week.
The expectation fails if the difference in percentage ((current_sum - average_sum) / average_sum) is more than the
threshold given by user (default value is 25%).
The threshold parameter should be given in fraction and not percent, i.e. for 25% define threshold = 0.25.
Keyword args:
-
- threshold (float; default = 0.25): threshold of difference between current and past weeks over which expectation fails
-
- weeks_back (int; default = 4): how many weeks back to compare the current metric with
Want to make your own Expectation or an improvement to this one?
We've put together some great how to guides (including videos) on how to create your own expectations in a flash!
You can see those resources here: Contributor Resources