| minmax | R Documentation |
The minmax() function normalizes data of the provided time series
to bring values into the range [0,1]. minmax.rev() reverses the
normalization.
minmax(data, max = NULL, min = NULL, byRow = FALSE)
minmax.rev(data, max, min)
data |
A numeric vector, a univariate time series containing the values to
be normalized, or a matrix with sliding windows as returned by |
max |
Integer indicating the maximal value in |
min |
Integer indicating the minimum value in |
byRow |
If |
Ranging is done by using:
X' = \frac{(x - x_{min})}{(x_{max} - x_{min})}
.
data normalized between 0 and 1. If byRow is TRUE,
the function returns data normalized by rows (sliding windows).
max and min are returned as attributes.
Rebecca Pontes Salles
R.J. Hyndman and G. Athanasopoulos, 2013, Forecasting: principles and practice. OTexts.
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:
an()
data(CATS)
d <- minmax(CATS[,1])
x <- minmax.rev(d, max = attributes(d)$max, min = attributes(d)$min)
all(round(x,4)==round(CATS[,1],4))
d <- minmax(sw(CATS[,1],5), byRow = TRUE)
x <- minmax.rev(d, max = attributes(d)$max, min = attributes(d)$min)
all(round(x,4)==round(sw(CATS[,1],5),4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.