Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

max_level_shift

Time series features based on sliding windows


Description

Computes feature of a time series based on sliding (overlapping) windows. max_level_shift finds the largest mean shift between two consecutive windows. max_var_shift finds the largest var shift between two consecutive windows. max_kl_shift finds the largest shift in Kulback-Leibler divergence between two consecutive windows.

Usage

max_level_shift(x, width = ifelse(frequency(x) > 1, frequency(x), 10))

max_var_shift(x, width = ifelse(frequency(x) > 1, frequency(x), 10))

max_kl_shift(x, width = ifelse(frequency(x) > 1, frequency(x), 10))

Arguments

x

a univariate time series

width

size of sliding window

Details

Computes the largest level shift and largest variance shift in sliding mean calculations

Value

A vector of 2 values: the size of the shift, and the time index of the shift.

Author(s)

Earo Wang and Rob J Hyndman


tsfeatures

Time Series Feature Extraction

v1.0.2
GPL-3
Authors
Rob Hyndman [aut, cre] (<https://orcid.org/0000-0002-2140-5352>), Yanfei Kang [aut] (<https://orcid.org/0000-0001-8769-6650>), Pablo Montero-Manso [aut], Thiyanga Talagala [aut] (<https://orcid.org/0000-0002-0656-9789>), Earo Wang [aut] (<https://orcid.org/0000-0001-6448-5260>), Yangzhuoran Yang [aut], Mitchell O'Hara-Wild [aut] (<https://orcid.org/0000-0001-6729-7695>), Souhaib Ben Taieb [ctb], Cao Hanqing [ctb], D K Lake [ctb], Nikolay Laptev [ctb], J R Moorman [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.