Learn R Programming

IncDTW (version 1.1.1)

norm: Time Series Normalization

Description

normalizes a time series per dimension

Usage

norm(x, type = c('z', '01'),
     xmean = NULL, xsd = NULL, xmin = NULL, xmax = NULL)

Arguments

x

time series as vector or matrix

type

character, describes the method of to normalize the time series (per column if x is multivariate). The parameter type is either 'z' for z-normalization or '01' for max-min normalization.

xmean

mean used for z-normalization

xsd

standard deviation used for z-normalization

xmin

minimum used for 0-1 normalization

xmax

maximum used for 0-1 normalization

Value

x

the normalized vector

Details

For a vector x the z-normalization subtracts the mean and devides by the standard deviation: of (x-mean(x))/sd(x). The min-max normalization performs (x-min(x))/(max(x)-min(x)).

Examples

Run this code
# NOT RUN {
x <- cumsum(rnorm(100, 10, 5))
y <- norm(x, "01")
z <- norm(x, "z")
# }

Run the code above in your browser using DataLab