getWhiteningMatrix: Get whitening matrix

View source: R/getWhiteningMatrix.R

getWhiteningMatrixR Documentation

Get whitening matrix

Description

Get whitening matrix implied by eclairs decompostion

Usage

getWhiteningMatrix(ecl, lambda)

Arguments

ecl

estimate of covariance/correlation matrix from eclairs storing U, d_1^2, \lambda and \nu

lambda

specify lambda and override value from ecl

Value

whitening matrix

Examples

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)


decorrelate documentation built on Aug. 8, 2025, 7:55 p.m.