X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=pkg%2FR%2FEMGLLF.R;fp=pkg%2FR%2FEMGLLF.R;h=e393ec8633ddfb711f382c8188d39f46df467ee2;hp=c30b0237166331117e183b674de943ee88b76f67;hb=e9db79707709c10947e89756eb5655c0747a2a1d;hpb=0ba1b11c49d7b2a0cae493200793c1ba3fb8b8e7 diff --git a/pkg/R/EMGLLF.R b/pkg/R/EMGLLF.R index c30b023..e393ec8 100644 --- a/pkg/R/EMGLLF.R +++ b/pkg/R/EMGLLF.R @@ -1,6 +1,9 @@ #' EMGLLF #' -#' Description de EMGLLF +#' Run a generalized EM algorithm developped for mixture of Gaussian regression +#' models with variable selection by an extension of the Lasso estimator (regularization parameter lambda). +#' Reparametrization is done to ensure invariance by homothetic transformation. +#' It returns a collection of models, varying the number of clusters and the sparsity in the regression mean. #' #' @param phiInit an initialization for phi #' @param rhoInit an initialization for rho @@ -14,13 +17,13 @@ #' @param Y matrix of responses (of size n*m) #' @param eps real, threshold to say the EM algorithm converges, by default = 1e-4 #' -#' @return A list ... phi,rho,pi,LLF,S,affec: -#' phi : parametre de moyenne renormalisé, calculé par l'EM -#' rho : parametre de variance renormalisé, calculé par l'EM -#' pi : parametre des proportions renormalisé, calculé par l'EM -#' LLF : log vraisemblance associée à cet échantillon, pour les valeurs estimées des paramètres -#' S : ... -#' affec : ... +#' @return A list (corresponding to the model collection) defined by (phi,rho,pi,LLF,S,affec): +#' phi : regression mean for each cluster +#' rho : variance (homothetic) for each cluster +#' pi : proportion for each cluster +#' LLF : log likelihood with respect to the training set +#' S : selected variables indexes +#' affec : cluster affectation for each observation (of the training set) #' #' @export EMGLLF <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, lambda,