- # Get summary "tableauRecap" from models ; TODO: jusqu'à ligne 114 à mon avis là c'est faux :/
- tableauRecap = sapply( models_list, function(models) {
- llh = do.call(rbind, lapply(models, function(model) model$llh))
- LLH = llh[-1,1]
- D = llh[-1,2]
- c(LLH, D, rep(k, length(LLH)), 1:length(LLH))
- })
- tableauRecap
- if (verbose)
- print('Model selection')
- tableauRecap = tableauRecap[rowSums(tableauRecap[, 2:4])!=0,]
- tableauRecap = tableauRecap[!is.infinite(tableauRecap[,1]),]
+ # Get summary "tableauRecap" from models
+ tableauRecap = do.call( rbind, lapply( models_list, function(models) {
+ #Pour un groupe de modeles (même k, différents lambda):
+ llh = matrix(ncol = 2)
+ for (l in seq_along(models))
+ llh = rbind(llh, models[[l]]$llh)
+ LLH = llh[-1,1]
+ D = llh[-1,2]
+ k = length(models[[1]]$pi)
+ cbind(LLH, D, rep(k, length(models)), 1:length(models))
+ } ) )
+ tableauRecap = tableauRecap[rowSums(tableauRecap[, 2:4])!=0,]
+ tableauRecap = tableauRecap[(tableauRecap[,1])!=Inf,]