Last chance! 50% off unlimited learning
Sale ends in
The an()
function normalizes data of the provided time series
to bring values into the range [0,1]. The function applies the method of
Adaptive Normalization designed for non-stationary heteroscedastic
(with non-uniform volatility) time series.
an.rev()
reverses the normalization.
an(data, max = NULL, min = NULL, byRow = TRUE, outlier.rm = TRUE, alpha = 1.5)an.rev(data, max, min, an)
data
normalized between 0 and 1.
max
and min
are returned as attributes, as well as the mean values of each row
(sliding window) in data
(an
).
A numeric matrix with sliding windows of time series data
as returned by sw
.
A numeric vector indicating the maximal values of each row
(sliding window) in data
. If NULL
it is automatically computed.
A numeric vector indicating the minimum values of each row
(sliding window) in data
. If NULL
it is automatically computed.
If TRUE
, the normalization is performed by rows (sliding windows),
the default.
If TRUE
, outlier values are removed from the data
during the normalization process, the default.
The multiplier for the interquartile range used as base for outlier removal.
The default is set to 1.5
. The value 3.0
is also commonly used
to remove only the extreme outliers.
The mean of each data window computed by an()
and returned as attribute.
Rebecca Pontes Salles
E. Ogasawara, L. C. Martinez, D. De Oliveira, G. Zimbrao, G. L. Pappa, and M. Mattoso, 2010, Adaptive Normalization: A novel data normalization approach for non-stationary time series, Proceedings of the International Joint Conference on Neural Networks.
Other normalization methods:
minmax()
data(CATS)
swin <- sw(CATS[,1],5)
d <- an(swin, outlier.rm=FALSE)
x <- an.rev(d, max=attributes(d)$max, min=attributes(d)$min, an=attributes(d)$an)
all(round(x,4)==round(swin,4))
Run the code above in your browser using DataLab