tsmeasures: Computes a feature matrix of a set of time-series

Description Usage Arguments Value Author(s) See Also Examples

Description

Computes various different features (e.g., entropy, trend, seasonality) of a set of time-series

Usage

1
2
tsmeasures(y, normalise = TRUE, width = ifelse(frequency(y) > 1, frequency(y), 
           10), window = width) 

Arguments

y

A multivariate time series

normalise

If TRUE, each time series is scaled to be normally distributed with mean 0 and sd 1

width

A window size for variance change, level shift and lumpiness

window

A window size for KLscore

Value

An object of class features with the following components:

lumpiness

Variance of annual variances of remainder

entropy

Spectral entropy from ForeCA package

ACF1

First order of autocorrelation

lshift

Level shift using rolling window

vchange

Variance change

cpoints

The number of crossing points

fspots

Flat spots using disretization

trend

Strength of trend

linearity

Strength of linearity

curvature

Strength of curvature

spikiness

Strength of spikiness

season

Strength of seasonality

peak

Strength of peaks

trough

Strength of trough

KLscore

Kullback-Leibler score

change.idx

Index of the maximum KL score

Author(s)

Rob J Hyndman, Earo Wang, Nikolay Laptev

See Also

continuous_entropy

Examples

1
2
3
4
5
6
  y <- tsmeasures(dat0, window = 48)
  # Add mean and variance to the "features" matrix
  avg <- colMeans(dat0)
  variance <- apply(dat0, 2, var)
  y <- cbind(y, avg, variance)
  class(y) <- c("features", "matrix")

robjhyndman/anomalous documentation built on May 27, 2019, 11:40 a.m.