Learn R Programming

TSMining (version 1.0)

Func.SAX: A function to perform symbolic approximation aggregate (SAX) for time series data

Description

The function create SAX symbols for a univariate time series. The details of this method can be referred to J. Lin, E. Keogh, L. Wei, S. Lonardi. Experiencing SAX: a novel symbolic representation of time series

Usage

Func.SAX(x, w, a, eps, norm)

Arguments

x
is a numeric vector representing the univariate time series
w
is the word size and should be an integer
a
is the alphabet size and should be an integer
eps
is the minimum threshold for variance in x and should be a numeric value. If x has a smaller variance than eps, it will represented as a word using the middle alphabet.
norm
is a logical value deciding whether standardization should be applied to x. If True, x is standardized using mean and standard deviation

Value

The function returns a SAX representation of x

Examples

Run this code
x <- runif(n = 20, min = 0, max = 20)
Func.SAX(x = x, w = 5, a = 5, eps = .01, norm = TRUE)

Run the code above in your browser using DataLab