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

entropy

Spectral entropy of a time series


Description

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

Usage

entropy(x)

Arguments

x

a univariate time series

Details

The spectral entropy equals the Shannon entropy of the spectral density f_x(λ) of a stationary process x_t:

H_s(x_t) = - \int_{-π}^{π} f_x(λ) \log f_x(λ) d λ,

where the density is normalized such that \int_{-π}^{π} f_x(λ) d λ = 1. An estimate of f(λ) can be obtained using spec.ar with the burg method.

Value

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

Author(s)

Rob J Hyndman

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 http://jmlr.org/proceedings/papers/v28/goerg13.html.

See Also

Examples

entropy(rnorm(1000))
entropy(lynx)
entropy(sin(1:20))

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.