ThresholdGram {ScreenClean} | R Documentation |
Thresholds the gram matrix
ThresholdGram(gram.full, delta = 1/log(dim(gram.full)[1]))
gram.full |
the gram matrix before the elementwise thresholding, a p by p symmetric matrix |
delta |
the threshold, the default is 1/log(p) |
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 |
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