decorrelate: Decorrelation projection

View source: R/decorrelate.R

decorrelateR Documentation

Decorrelation projection

Description

Efficient decorrelation projection using eclairs decomposition

Usage

decorrelate(X, ecl, lambda, transpose = FALSE, alpha = -1/2)

Arguments

X

matrix to be transformed so *columns* are independent

ecl

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

lambda

specify lambda and override value from ecl

transpose

logical, (default FALSE) indicating if X should be transposed first

alpha

default = -1/2. Exponent of eigen-values

Details

Apply a decorrelation transform using the implicit covariance approach to avoid directly evaluating the covariance matrix

Value

a matrix following the decorrelation transformation

Examples

library(Rfast)

n <- 800 # number of samples
p <- 200 # number of features

# create correlation matrix
Sigma <- autocorr.mat(p, .9)

# draw data from correlation matrix Sigma
Y <- rmvnorm(n, rep(0, p), sigma = Sigma * 5.1, seed = 1)

# eclairs decomposition
ecl <- eclairs(Y)

# whitened Y
Y.transform <- decorrelate(Y, ecl)
#

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