ThresholdGram {ScreenClean} | R Documentation |
Thresholds the gram matrix
Description
Thresholds the gram matrix
Usage
ThresholdGram(gram.full, delta = 1/log(dim(gram.full)[1]))
Arguments
gram.full |
the gram matrix before the elementwise thresholding, a p by p symmetric matrix |
delta |
the threshold, the default is 1/log(p) |
Value
A list with two elements
gram.sd |
the threhsolded gram matrix, a sparse matrix |
gram.bias |
the difference of the orginal matrix and the threholded matrix |
Examples
p <-10
off.diag<-matrix(runif(p^2),p,p)
omega <- (off.diag+t(off.diag))*0.3
diag(omega) <- 1
omega.omega<-ThresholdGram(omega,0.3)
omega.omega$gram
omega.omega$gram.bias
[Package ScreenClean version 1.0.1 Index]