From: Benjamin Auder Date: Mon, 9 Jan 2017 13:44:19 +0000 (+0100) Subject: update Makevars X-Git-Url: https://git.auder.net/js/img/css/rpsls.css?a=commitdiff_plain;h=cad71b2c9e838c8f65313e590e6cf6980b037401;p=valse.git update Makevars --- diff --git a/NAMESPACE b/NAMESPACE index c625f7e..656ff8d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,3 +9,5 @@ export(gridLambda) export(indicesSelection) export(initSmallEM) export(modelSelection) +export(selectVariables) +useDynLib(valse) diff --git a/R/main.R b/R/main.R index 6633be2..4c4e87c 100644 --- a/R/main.R +++ b/R/main.R @@ -1,3 +1,5 @@ +#' @useDynLib valse + Valse = setRefClass( Class = "Valse", diff --git a/R/selectVariables.R b/R/selectVariables.R index e1a4e33..3f58ea3 100644 --- a/R/selectVariables.R +++ b/R/selectVariables.R @@ -15,10 +15,11 @@ #' @param thres threshold to consider a coefficient to be equal to 0 #' @param tau threshold to say that EM algorithm has converged #' -#' @return -#' @export +#' @return TODO +#' +#' @examples TODO #' -#' @examples +#' @export selectVariables <- function(phiInit,rhoInit,piInit,gamInit, mini,maxi,gamma,glambda,X,Y,thres,tau) { diff --git a/man/basic_Init_Parameters.Rd b/man/basic_Init_Parameters.Rd index 3be2e2d..981b984 100644 --- a/man/basic_Init_Parameters.Rd +++ b/man/basic_Init_Parameters.Rd @@ -3,7 +3,7 @@ \name{basic_Init_Parameters} \alias{basic_Init_Parameters} \title{Initialize the parameters in a basic way (zero for the conditional mean, - uniform for weights, identity for covariance matrices, and uniformly distributed forthe clustering)} +uniform for weights, identity for covariance matrices, and uniformly distributed forthe clustering)} \usage{ basic_Init_Parameters(n, p, m, k) } @@ -21,6 +21,6 @@ list with phiInit, rhoInit,piInit,gamInit } \description{ Initialize the parameters in a basic way (zero for the conditional mean, - uniform for weights, identity for covariance matrices, and uniformly distributed forthe clustering) +uniform for weights, identity for covariance matrices, and uniformly distributed forthe clustering) } diff --git a/man/discardSimilarModels.Rd b/man/discardSimilarModels.Rd index 0a73b7e..7cef581 100644 --- a/man/discardSimilarModels.Rd +++ b/man/discardSimilarModels.Rd @@ -19,7 +19,7 @@ discardSimilarModels(B1, B2, glambda, rho, pi) } \value{ a list with update B1, B2, glambda, rho and pi, and ind the vector of indices - of selected models. +of selected models. } \description{ Discard models which have the same relevant variables diff --git a/man/generateIO.Rd b/man/generateIO.Rd index b420156..bf8fb20 100644 --- a/man/generateIO.Rd +++ b/man/generateIO.Rd @@ -7,9 +7,9 @@ generateIO(covX, covY, pi, beta, n) } \arguments{ -\item{covX}{covariance for covariates} +\item{covX}{covariance for covariates (of size p*p*K)} -\item{covY}{covariance for the response vector} +\item{covY}{covariance for the response vector (of size m*m*K)} \item{pi}{proportion for each cluster} diff --git a/man/indicesSelection.Rd b/man/indicesSelection.Rd index 21d8e2d..a727cdf 100644 --- a/man/indicesSelection.Rd +++ b/man/indicesSelection.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/indicesSelection.R \name{indicesSelection} \alias{indicesSelection} -\title{Construct the set of relevant indices} +\title{Construct the set of relevant indices -> ED: je crois que cette fonction n'est pas utile} \usage{ indicesSelection(phi, thresh = 1e-06) } @@ -13,9 +13,9 @@ indicesSelection(phi, thresh = 1e-06) } \value{ a list with A, a matrix with relevant indices (size = p*m) and B, a - matrix with irrelevant indices (size = p*m) + matrix with irrelevant indices (size = p*m) } \description{ -Construct the set of relevant indices +Construct the set of relevant indices -> ED: je crois que cette fonction n'est pas utile } diff --git a/man/modelSelection.Rd b/man/modelSelection.Rd index c65b678..650bf70 100644 --- a/man/modelSelection.Rd +++ b/man/modelSelection.Rd @@ -14,7 +14,7 @@ the second column corresponds to the dimensions of the corresponding models.} } \value{ a list with indices, a vector of indices selected models, - and D1, a vector of corresponding dimensions + and D1, a vector of corresponding dimensions } \description{ Among a collection of models, this function constructs a subcollection of models with diff --git a/man/selectVariables.Rd b/man/selectVariables.Rd new file mode 100644 index 0000000..09a52f2 --- /dev/null +++ b/man/selectVariables.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/selectVariables.R +\name{selectVariables} +\alias{selectVariables} +\title{selectVaribles +It is a function which construct, for a given lambda, the sets of +relevant variables and irrelevant variables.} +\usage{ +selectVariables(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, glambda, + X, Y, thres, tau) +} +\arguments{ +\item{phiInit}{an initial estimator for phi (size: p*m*k)} + +\item{rhoInit}{an initial estimator for rho (size: m*m*k)} + +\item{piInit}{an initial estimator for pi (size : k)} + +\item{gamInit}{an initial estimator for gamma} + +\item{mini}{minimum number of iterations in EM algorithm} + +\item{maxi}{maximum number of iterations in EM algorithm} + +\item{gamma}{power in the penalty} + +\item{glambda}{grid of regularization parameters} + +\item{X}{matrix of regressors} + +\item{Y}{matrix of responses} + +\item{thres}{threshold to consider a coefficient to be equal to 0} + +\item{tau}{threshold to say that EM algorithm has converged} +} +\value{ +TODO +} +\description{ +selectVaribles +It is a function which construct, for a given lambda, the sets of +relevant variables and irrelevant variables. +} +\examples{ +TODO + +} + diff --git a/src/Makevars b/src/Makevars index 6068f39..50b7fb6 100644 --- a/src/Makevars +++ b/src/Makevars @@ -4,7 +4,7 @@ PKG_CFLAGS=-g -I./sources #Prod flags: #PKG_CFLAGS=-O2 -I./sources -PKG_LIBS=-lm +PKG_LIBS=-lm -lgsl -lcblas SOURCES = $(wildcard adapters/*.c sources/*.c)