Title: | Parameter-Free Domain-Agnostic Season Length Detection in Time Series |
---|---|
Description: | Spectral and Average Autocorrelation Zero Distance Density ('sazed') is a method for estimating the season length of a seasonal time series. 'sazed' is aimed at practitioners, as it employs only domain-agnostic preprocessing and does not depend on parameter tuning or empirical constants. The computation of 'sazed' relies on the efficient autocorrelation computation methods suggested by Thibauld Nion (2012, URL: <https://etudes.tibonihoo.net/literate_musing/autocorrelations.html>) and by Bob Carpenter (2012, URL: <https://lingpipe-blog.com/2012/06/08/autocorrelation-fft-kiss-eigen/>). |
Authors: | Maximilian Toller [aut], Tiago Santos [aut, cre], Roman Kern [aut] |
Maintainer: | Tiago Santos <[email protected]> |
License: | GPL-2 |
Version: | 2.0.2 |
Built: | 2024-11-29 08:50:07 UTC |
Source: | CRAN |
aze
estimates the season length of its argument from the mean autocorrelation zero
distance
aze(y, preprocess = T)
aze(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The AZE season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) aze(y) aze(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) aze(y) aze(y, preprocess = FALSE)
azed
computes the autocorrelation of its argument, and then derives the
season length from its the autocorrelations zero density.
azed(y, preprocess = T)
azed(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The AZED season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) azed(y) azed(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) azed(y) azed(y, preprocess = FALSE)
computeAcf
computes the autocorrelation function of its argument and discards
the zero lag and all lags greater than 2/3 of the argument's length
computeAcf(y)
computeAcf(y)
y |
The input time series. |
The shortened autocorrelation
season_length <- 26 y <- sin(1:400*2*pi/season_length) computeAcf(y)
season_length <- 26 y <- sin(1:400*2*pi/season_length) computeAcf(y)
downsample
samples down a time series with a rolling mean.
downsample(data, window_size = 2)
downsample(data, window_size = 2)
data |
The input time series. |
window_size |
The size of the rolling mean window used. |
The downsampled time series.
preprocessTs
detrends and z-normalizes its argument.
preprocessTs(y)
preprocessTs(y)
y |
The input time series. |
The detrended and z-normalized time series.
season_length <- 26 y <- sin(1:400*2*pi/season_length) preprocessTs(y)
season_length <- 26 y <- sin(1:400*2*pi/season_length) preprocessTs(y)
S
computes the spectral density of its argument, and then derives the
season length from it.
S(y, preprocess = T)
S(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The S season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) S(y) S(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) S(y) S(y, preprocess = FALSE)
Sa
computes the autocorrelation of its argument, and then derives the
season length from its spectral density.
Sa(y, preprocess = T)
Sa(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The SA season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) Sa(y) Sa(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) Sa(y) Sa(y, preprocess = FALSE)
sazed
estimates a time series' season length by combining 3 different estimates
computed on an input time series and its 10-fold self-composed autocorrelation.
sazed(y)
sazed(y)
y |
The input time series. |
The season length of the input time series.
season_length <- 26 y <- sin(1:400*2*pi/season_length) sazed(y)
season_length <- 26 y <- sin(1:400*2*pi/season_length) sazed(y)
sazed.maj
estimates a time series' season length by computing 6 different
estimates and taking a majority vote.
sazed.maj(y, iter = 0, method = "down", preprocess = T)
sazed.maj(y, iter = 0, method = "down", preprocess = T)
y |
The input time series. |
iter |
The recursion depth. |
method |
The method used for breaking ties. One of |
preprocess |
If true, y is detrended and z-normalized before computation. |
The season length of the input time series.
season_length <- 26 y <- sin(1:400*2*pi/season_length) sazed.maj(y)
season_length <- 26 y <- sin(1:400*2*pi/season_length) sazed.maj(y)
The sazedR package provides the main function to compute season length, sazed, which is an ensemble of many season length estimation methods, also included in this package.
ze
estimates the season length of its argument from the mean zero distance
ze(y, preprocess = T)
ze(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The ZE season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) ze(y) ze(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) ze(y) ze(y, preprocess = FALSE)
zed
computes the zero density of its argument, and then derives the
season length from it.
zed(y, preprocess = T)
zed(y, preprocess = T)
y |
The input time series. |
preprocess |
If true, y is detrended and z-normalized before computation. |
The ZED season length estimate of y.
season_length <- 26 y <- sin(1:400*2*pi/season_length) zed(y) zed(y, preprocess = FALSE)
season_length <- 26 y <- sin(1:400*2*pi/season_length) zed(y) zed(y, preprocess = FALSE)