revert src/test/utils.c
[valse.git] / R / discardSimilarModels2.R
1 #' Similar to discardSimilarModels, for Lasso-rank procedure (focus on columns)
2 #'
3 #' @param B1 array of relevant coefficients (of size p*m*length(gridlambda))
4 #' @param rho covariance matrix
5 #' @param pi weight parameters
6 #'
7 #' @return a list with B1, in, rho, pi
8 #' @export
9 #'
10 discardSimilarModels2 = function(B1,rho,pi)
11 { ind = c()
12 dim_B1 = dim(B1)
13 B2 = array(0,dim=c(dim_B1[1],dim_B1[2],dim_B1[3]))
14 sizeLambda=dim_B1[3]
15 glambda = rep(0,sizeLambda)
16
17 suppressmodel = discardSimilarModels(B1,B2,glambda,rho,pi)
18 return (list(B1 = suppressmodel$B1, ind = suppressmodel$ind,
19 rho = suppressmodel$rho, pi = suppressmodel$pi))
20 }