Learn R Programming

feasts (version 0.3.0)

feat_spectral: Spectral features of a time series

Description

Computes spectral entropy from a univariate normalized spectral density, estimated using an AR model.

Usage

feat_spectral(x, .period = 1, ...)

Value

A non-negative real value for the spectral entropy \(H_s(x_t)\).

Arguments

x

a univariate time series

.period

The seasonal period.

...

Further arguments for stats::spec.ar()

Author

Rob J Hyndman

Details

The spectral entropy equals the Shannon entropy of the spectral density \(f_x(\lambda)\) of a stationary process \(x_t\): $$ H_s(x_t) = - \int_{-\pi}^{\pi} f_x(\lambda) \log f_x(\lambda) d \lambda, $$ where the density is normalized such that \(\int_{-\pi}^{\pi} f_x(\lambda) d \lambda = 1\). An estimate of \(f(\lambda)\) can be obtained using spec.ar with the burg method.

References

Jerry D. Gibson and Jaewoo Jung (2006). “The Interpretation of Spectral Entropy Based Upon Rate Distortion Functions”. IEEE International Symposium on Information Theory, pp. 277-281.

Goerg, G. M. (2013). “Forecastable Component Analysis”. Journal of Machine Learning Research (JMLR) W&CP 28 (2): 64-72, 2013. Available at https://proceedings.mlr.press/v28/goerg13.html.

See Also

Examples

Run this code
feat_spectral(rnorm(1000))
feat_spectral(lynx)
feat_spectral(sin(1:20))

Run the code above in your browser using DataLab