Seasonal Trend Decomposition Ensemble
The basic idea of Seasonal Trend Decomposition [1] is to filter out seasonality and trend of a time series to evaluate deviations from the expected behaviour. By the use of Locally Weighted Linear Regression (LOESS) Models a time series gets decomposed in a seasonal and a trend part. The remainder is evaluated to define a flag, which reflects the state of the service. This flag is calculated by the use of an ensemble vote of different evaluations of the error.
stl_model = stl_seasonal - stl_trend
error_abs = raw_input - stl_model
error_norm = error_abs > 0 ? error_abs / raw_input : error_abs / stl_model
see [here](Error Handling)
All possible combinations (norm_quantile, norm_tukey, abs_quantile, abs_tukey) are evaluated and the single flags are summed up. If the threshold parameter is reached or exceeded by the sum of the single flags, the overall flag is set to an error state (-1, +1).
Example:
{
"SeasonalDecomposition": {
"scheduler_options": {},
"worker_options": {
"service1:requests": {
"metric": "service1.requests.count*",
"period_length": 5,
"seasons": 2,
"interval": 10,
"error_params": {
"threshold": 2,
"alpha": "0.02",
"scaling": 2,
"minimal_upper_threshold": 0.1,
"minimal_lower_threshold": -0.1,
}
}
}
}
}
- metric Regex for TimeStamped Metric Values
- period_length Number of datapoints within one period (e.g. 12 for monthly recorded datapoints given a period of a year)
- seasons Number of Periods one wants to look at (e.g. years of recording)
- interval Interval between datapoints in seconds to fill up missing datapoints
- [optional/default: 2] error_params:threshold Min number of evaluations to be errornous before overall flag is set
- [optional/default: 1.5] error_params:scaling IQR Scaling Factor (Tukeys Method only)
- [optional/default: 0.01] error_params:alpha Cutoff Percentile (Quantile Method only)
- [optional] error_params:minimal_lower_threshold minimum threshold which needs to be fallen below before setting the error flag (both methods)
- [optional] error_params:minimal_upper_threshold minimum threshold which has to exceeded before setting the error flag (both methods)
[1] https://stat.ethz.ch/R-manual/R-patched/library/stats/html/stl.html