R (>= 3.0.0)
Imports:
MASS,
- parallel
+ parallel
Suggests:
capushe,
roxygen2,
URL: http://git.auder.net/?p=valse.git
License: MIT + file LICENSE
RoxygenNote: 5.0.1
+Collate:
+ 'plot.R'
+ 'main.R'
+ 'selectVariables.R'
+ 'filterModels.R'
+ 'constructionModelesLassoRank.R'
+ 'constructionModelesLassoMLE.R'
+ 'computeGridLambda.R'
+ 'initSmallEM.R'
+ 'EMGrank.R'
+ 'EMGLLF.R'
+ 'generateXY.R'
+ 'A_NAMESPACE.R'
m = dim(phiInit)[2]
k = dim(phiInit)[3]
- # TODO: explain why gamma=1 instad of just 'gamma'?
- list_EMG = EMGLLF(phiInit, rhoInit, piInit, gamInit, mini, maxi,
- gamma=1, lamba=0, X, Y, tau)
+ list_EMG = EMGLLF(phiInit, rhoInit, piInit, gamInit, mini, maxi,
+ gamma, lambda=0, X, Y, tau)
grid = array(0, dim=c(p,m,k))
for (i in 1:p)
{
grid[i,j,] = abs(list_EMG$S[i,j,]) / (n*list_EMG$pi^gamma)
}
grid = unique(grid)
- grid = grid[grid <= 1]
grid
}
# List (index k) of lists (index lambda) of models
models_list <-
- if (ncores_k > 1)
+ #if (ncores_k > 1)
+ if (ncores_outer > 1)
parLapply(cl, kmin:kmax, computeModels)
else
lapply(kmin:kmax, computeModels)
- if (ncores_k > 1)
+ #if (ncores_k > 1)
+ if (ncores_outer > 1)
parallel::stopCluster(cl)
if (! requireNamespace("capushe", quietly=TRUE))
# Get summary "tableauRecap" from models ; TODO: jusqu'à ligne 114 à mon avis là c'est faux :/
tableauRecap = t( sapply( models_list, function(models) {
- llh = do.call(rbind, lapply(models, function(model) model$llh)
+ llh = do.call(rbind, lapply(models, function(model) model$llh))
LLH = llh[-1,1]
D = llh[-1,2]
c(LLH, D, rep(k, length(model)), 1:length(model))
- ) } ) )
+ } ))
if (verbose)
print('Model selection')
tableauRecap = tableauRecap[rowSums(tableauRecap[, 2:4])!=0,]