Adjustments for CRAN upload master
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 28 May 2021 10:01:01 +0000 (12:01 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 28 May 2021 10:01:01 +0000 (12:01 +0200)
pkg/R/EMGLLF.R
pkg/R/EMGrank.R
pkg/R/computeGridLambda.R
pkg/R/constructionModelesLassoMLE.R
pkg/R/constructionModelesLassoRank.R
pkg/R/generateXY.R
pkg/R/initSmallEM.R
pkg/R/selectVariables.R

index 1633821..4c31bb5 100644 (file)
 #' @param eps real, threshold to say the EM algorithm converges, by default = 1e-4
 #' @param fast boolean to enable or not the C function call
 #'
-#' @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
+#' @return A list (corresponding to the model collection) defined by (phi,rho,pi,llh,S,affec):
+#'   phi : regression mean for each cluster, an array of size p*m*k
+#'   rho : variance (homothetic) for each cluster, an array of size m*m*k
+#'   pi : proportion for each cluster, a vector of size k
+#'   llh : log likelihood with respect to the training set
+#'   S : selected variables indexes, an array of size p*m*k
 #'   affec : cluster affectation for each observation (of the training set)
 #'
 #' @export
index 9531ae4..8890e18 100644 (file)
@@ -16,7 +16,7 @@
 #' @param fast boolean to enable or not the C function call
 #'
 #' @return A list (corresponding to the model collection) defined by (phi,LLF):
-#'   phi : regression mean for each cluster
+#'   phi : regression mean for each cluster, an array of size p*m*k
 #'   LLF : log likelihood with respect to the training set
 #'
 #' @export
index 3dae84c..f4073d0 100644 (file)
@@ -14,7 +14,8 @@
 #' @param eps threshold to stop EM algorithm
 #' @param fast boolean to enable or not the C function call
 #'
-#' @return the grid of regularization parameters
+#' @return the grid of regularization parameters for the Lasso estimator. The output is a vector with nonnegative values that are relevant
+#' to be considered as regularization parameter as they are equivalent to a 0 in the regression parameter.
 #'
 #' @export
 computeGridLambda <- function(phiInit, rhoInit, piInit, gamInit, X, Y, gamma, mini,
index fd0cd4d..692fbe1 100644 (file)
 #' @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
+#' @return a list with several models, defined by phi (the regression parameter reparametrized),
+#' rho (the covariance parameter reparametrized), pi (the proportion parameter is the mixture model), llh
+#' (the value of the loglikelihood function for this estimator on the training dataset). The list is given
+#' for several levels of sparsity, given by several regularization parameters computed automatically.
 #'
 #' @export
 constructionModelesLassoMLE <- function(phiInit, rhoInit, piInit, gamInit, mini,
index 7a02967..a37a7a6 100644 (file)
 #' @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
+#' @return a list with several models, defined by phi (the regression parameter reparametrized),
+#' rho (the covariance parameter reparametrized), pi (the proportion parameter is the mixture model), llh
+#' (the value of the loglikelihood function for this estimator on the training dataset). The list is given
+#' for several levels of sparsity, given by several regularization parameters computed automatically,
+#' and several ranks (between rank.min and rank.max).
 #'
 #' @export
 constructionModelesLassoRank <- function(S, k, mini, maxi, X, Y, eps, rank.min, rank.max,
index fde4b0f..6b811d6 100644 (file)
@@ -9,7 +9,7 @@
 #' @param beta regression matrix, of size p*m*k
 #' @param covY covariance for the response vector (of size m*m)
 #'
-#' @return list with X and Y
+#' @return list with X (of size n*p) and Y (of size n*m)
 #'
 #' @export
 generateXY <- function(n, prop, meanX, beta, covX, covY)
index cf31c63..3945322 100644 (file)
@@ -7,7 +7,9 @@
 #' @param Y matrix of responses (of size n*m)
 #' @param fast boolean to enable or not the C function call
 #'
-#' @return a list with phiInit, rhoInit, piInit, gamInit
+#' @return a list with phiInit (the regression parameter reparametrized),
+#' rhoInit (the covariance parameter reparametrized), piInit (the proportion parameter is the
+#' mixture model), gamInit (the conditional expectation)
 #'
 #' @importFrom stats cutree dist hclust runif
 #'
index 2d1c9b7..b8ea1a0 100644 (file)
@@ -17,7 +17,8 @@
 #' @param ncores Number or cores for parallel execution (1 to disable)
 #' @param fast boolean to enable or not the C function call
 #'
-#' @return a list of outputs, for each lambda in grid: selected,Rho,Pi
+#' @return a list, varying lambda in a grid, with selected (the indices of variables that are selected),
+#' Rho (the covariance parameter, reparametrized), Pi (the proportion parameter)
 #'
 #' @export
 selectVariables <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma,