whitening | R Documentation |
Applies the whitening transformation to a data matrix based on the Cholesky decomposition of the empirical covariance matrix.
whitening(x, Scatter = NULL)
x |
vector or matrix of data with, say, |
Scatter |
covariance (or scatter) matrix ( |
Returns the whitened data matrix \bold{Z} = \bold{X W}^T
, where
\bold{W}^T\bold{W} = \bold{S}^{-1},
with \bold{S}
the empirical covariance matrix.
Kessy, A., Lewin, A., Strimmer, K. (2018). Optimal whitening and decorrelation. The American Statistician 72, 309-314.
x <- iris[,1:4]
species <- iris[,5]
pairs(x, col = species) # plot of Iris
# whitened data
z <- whitening(x)
pairs(z, col = species) # plot of
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.