normalize {SVMMaj} | R Documentation |
Normalize/standardize the columns of a matrix
Description
Standardize the columns of an attribute matrix X
to zscores, to the
range [0 1]
or a prespecified scale.
Usage
normalize(x, standardize = "zscore")
Arguments
x |
An attribute variable which will be scaled. |
standardize |
Either a string value denoting a predefined scaling, or a
list with values |
Value
The standardized matrix. The numeric centering and scalings used are
returned as attribute "standardize"
.
Author(s)
Hok San Yip, Patrick J.F. Groenen, Georgi Nalbantov
References
P.J.F. Groenen, G. Nalbantov and J.C. Bioch (2008) SVM-Maj: a majorization approach to linear support vector machines with different hinge errors.
See Also
Examples
## standardize the first 50 objects to zscores
x <- iris$Sepal.Length
x1 <- normalize(x[1:50], standardize = "zscore")
## use the same settings to apply to the next 100 observations
x2 <- normalize(x[-(1:50)], standardize = attr(x1, "standardization"))
[Package SVMMaj version 0.2.9.3 Index]