#' constructionModelesLassoRank
#'
#' Construct a collection of models with the Lasso-Rank procedure.
-#'
+#'
#' @param S output of selectVariables.R
#' @param k number of components
#' @param mini integer, minimum number of iterations in the EM algorithm, by default = 10
#' @param ncores Number of cores, by default = 3
#' @param fast TRUE to use compiled C code, FALSE for R code only
#' @param verbose TRUE to show some execution traces
-#'
+#'
#' @return a list with several models, defined by phi, rho, pi, llh
#'
#' @export
phi[relevant, , ] <- res$phi
}
list(llh = llh, phi = phi, pi = S[[lambdaIndex]]$Pi, rho = S[[lambdaIndex]]$Rho)
-
}
}
# For each lambda in the grid we compute the estimators
- out <- if (ncores > 1)
- parLapply(cl, seq_len(length(S) * Size), computeAtLambda) else lapply(seq_len(length(S) * Size), computeAtLambda)
+ out <- if (ncores > 1)
+ {
+ parLapply(cl, seq_len(length(S) * Size), computeAtLambda)
+ } else
+ {
+ lapply(seq_len(length(S) * Size), computeAtLambda)
+ }
if (ncores > 1)
parallel::stopCluster(cl)