View source: R/getWhiteningMatrix.R
getWhiteningMatrix | R Documentation |
Get whitening matrix implied by eclairs decompostion
getWhiteningMatrix(ecl, lambda)
ecl |
estimate of covariance/correlation matrix from eclairs storing |
lambda |
specify lambda and override value from |
whitening matrix
library(Rfast)
n <- 2000
p <- 3
Y <- matrnorm(n, p, seed = 1) * 10
# decorrelate with implicit whitening matrix
# give same result as explicity whitening matrix
ecl <- eclairs(Y, compute = "covariance")
# get explicit whitening matrix
W <- getWhiteningMatrix(ecl)
# apply explicit whitening matrix
Z1 <- tcrossprod(Y, W)
# use implicit whitening matrix
Z2 <- decorrelate(Y, ecl)
range(Z1 - Z2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.