1 function[phi,rho,pi,lvraisemblance] = constructionModelesLassoMLE(...
2 phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,glambda,X,Y,seuil,tau,A1,A2)
8 [p,m,k] = size(phiInit);
15 lvraisemblance = zeros(L,2);
19 a = A1(:,1,lambdaIndex);
24 [phiLambda,rhoLambda,piLambda,~,~] = EMGLLF(...
25 phiInit(a,:,:),rhoInit,piInit,gamInit,mini,maxi,gamma,0,X(:,a),Y,tau);
28 phi(a(j),:,:,lambdaIndex) = phiLambda(j,:,:);
30 rho(:,:,:,lambdaIndex) = rhoLambda;
31 pi(:,lambdaIndex) = piLambda;
35 b = A2(j,2:end,lambdaIndex);
38 phi(A2(j,1,lambdaIndex),b,:,lambdaIndex) = 0.0;
40 c = A1(j,2:end,lambdaIndex);
42 dimension = dimension + length(c);
45 %on veut calculer l'EMV avec toutes nos estimations
49 delta = Y(i,:)*rho(:,:,r,lambdaIndex) - (X(i,a)*(phi(a,:,r,lambdaIndex)));
50 densite(i,lambdaIndex) = densite(i,lambdaIndex) +...
51 pi(r,lambdaIndex)*det(rho(:,:,r,lambdaIndex))/(sqrt(2*PI))^m*exp(-dot(delta,delta)/2.0);
54 lvraisemblance(lambdaIndex,1) = sum(log(densite(:,lambdaIndex)));
55 lvraisemblance(lambdaIndex,2) = (dimension+m+1)*k-1;