# spatialSign

0th

Percentile

##### Compute the multivariate spatial sign

Compute the spatial sign (a projection of a data vector to a unit length circle). The spatial sign of a vector w is w /norm(w).

Keywords
manip
##### Usage
"spatialSign"(x)
"spatialSign"(x)
"spatialSign"(x)
##### Arguments
x
an object full of numeric data (which should probably be scaled). Factors are not allowed. This could be a vector, matrix or data frame.

##### References

Serneels et al. Spatial sign preprocessing: a simple way to impart moderate robustness to multivariate estimators. J. Chem. Inf. Model (2006) vol. 46 (3) pp. 1402-1409

##### Aliases
• spatialSign
• spatialSign.default
• spatialSign.matrix
• spatialSign.data.frame
##### Examples
spatialSign(rnorm(5))

spatialSign(matrix(rnorm(12), ncol = 3))

# should fail since the fifth column is a factor
try(spatialSign(iris), silent = TRUE)

spatialSign(iris[,-5])

trellis.par.set(caretTheme())
featurePlot(iris[,-5], iris[,5], "pairs")
featurePlot(spatialSign(scale(iris[,-5])), iris[,5], "pairs")

Documentation reproduced from package caret, version 6.0-70, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.