dailyDCOffsetMetric(df, offsetDays=5, outlierWindow=7, outlierThreshold=6.0, outlierSelectivity=0.1)sample_mean values obtained with getSingleValueMetrics()MultipleTimeValueMetric object for each day in the incoming dataframe..
offsetDays days.
Shifts in the mean that are persistent and larger than the typical standard deviation of daily means will
generate higher metric values.Details of the algorithm are as follows
# data0 = download 12+ months of daily means (in the 'df' dataframe) # data1 = remove outliers using MAD outlier detection with the 'outlier' arguments specified # data2 = replace outliers with rolling median values using a 7 day window # weights = calculate absolute lagged differences with 1-N day lags (big jumps have large values) # metric0 = multiply the lagged differences together and take the N'th root # stddev0 = calculate the rolling standard deviation of data2 with a N-day window # METRIC = divide metric0 by the median value of stddev0
getSingleValueMetrics