X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=pkg%2FR%2FconstructionModelesLassoRank.R;h=f5c927445dcc5a66bc46e3e22ca9d2a628d0d463;hp=fe75d2c6169e69b86c0547dab16b6fb862f0516b;hb=9ccdd55a1f6e9d409e8ae43b878a5e89c42e20c7;hpb=7a56cc1804edcc2bb3ca3e4a8589faf55eb03547 diff --git a/pkg/R/constructionModelesLassoRank.R b/pkg/R/constructionModelesLassoRank.R index fe75d2c..f5c9274 100644 --- a/pkg/R/constructionModelesLassoRank.R +++ b/pkg/R/constructionModelesLassoRank.R @@ -1,7 +1,7 @@ #' 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 @@ -14,7 +14,7 @@ #' @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 @@ -85,8 +85,13 @@ constructionModelesLassoRank <- function(S, k, mini, maxi, X, Y, eps, rank.min, } # 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)