1 constructionModelesLassoRank = function(Pi,Rho,mini,maxi,X,Y,tau,A1,rangmin,rangmax){
9 deltaRank = rangmax - rangmin + 1
11 Rank = matrix(0, Size, k)
16 phi = array(0, dim=c(p,m,k,L*Size))
17 lvraisemblance = matrix(0, L*Size, 2)
18 for(lambdaIndex in 1:L){
19 #on ne garde que les colonnes actives
20 #active sera l'ensemble des variables informatives
21 active = A1[, lambdaIndex]
22 active[active==0] = c()
25 EMG_rank = EMGrank(Pi[,lambdaIndex], Rho[,,,lambdaIndex], mini, maxi, X[, active], Y, tau, Rank[j,])
26 phiLambda = EMG_rank$phi
28 lvraisemblance[(lambdaIndex-1)*Size+j,] = c(LLF, sum(Rank[j,]^(length(active)- Rank[j,]+m)))
29 phi[active,,,(lambdaIndex-1)*Size+j] = phiLambda
33 return(list(phi=phi, lvraisemblance = lvraisemblance))