11 lines
428 B
Matlab
11 lines
428 B
Matlab
function probas = probabilites_EM(D_app,parametres_estim,proportion_1,proportion_2,sigma)
|
|
n_app = length(D_app);
|
|
probas = zeros(2,n_app);
|
|
for i = 1:n_app
|
|
p1 = proportion_1/sigma * exp(-calcul_r(D_app(:,i),parametres_estim(1,:)).^2 / (2*sigma^2));
|
|
p2 = proportion_2/sigma * exp(-calcul_r(D_app(:,i),parametres_estim(2,:)).^2 / (2*sigma^2));
|
|
probas(:,i) = [p1/(p1+p2) p2/(p1+p2)];
|
|
end
|
|
end
|
|
|