Learn R Programming

ANTsR (version 1.0)

fastwhiten: Simple fastwhitening function.

Description

whitens the input matrix using a fast SVD and returns the result. can select number of principal components to use. might want to scale the matrix before input.

Usage

wmat<-fastwhiten( mat , 50 )

Arguments

mat

input matrix

Value

matrix is output

Examples

Run this code
# NOT RUN {
mat<-replicate(400, rnorm(600)) 
print(mean(abs(cor(mat))))
wmat<-fastwhiten( scale( mat ) ) 
print(mean(abs(cor(wmat))))
wmat<-fastwhiten( scale( mat ), 20 ) 
print(mean(abs(cor(wmat))))
# }

Run the code above in your browser using DataLab