X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=pkg%2FR%2FconstructionModelesLassoRank.R;h=493783048398c87dad1e6905f1e8fda27e84c056;hp=fe75d2c6169e69b86c0547dab16b6fb862f0516b;hb=7d0865a15f12e42f3df25a8a80d29e6cdf31c805;hpb=7a56cc1804edcc2bb3ca3e4a8589faf55eb03547 diff --git a/pkg/R/constructionModelesLassoRank.R b/pkg/R/constructionModelesLassoRank.R index fe75d2c..4937830 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 @@ -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)