anomalous (version 0.1.0)

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

Description

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

Usage

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

See Also

continuous_entropy

Examples

Run this code
# NOT RUN {
  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")
# }

Run the code above in your browser using DataLab