www.pudn.com > gmm_utilities.zip > gmm_divide.m


function gr = gmm_divide(g1,g2) 
% 
% gr = g1/g2 
% 
if length(g2.w) == 1 
    gr = gmm_divide_gauss_denominator(g1, g2); 
else 
    gr = gmm_divide_gmm_denominator(g1, g2); 
end 
 
% 
% 
 
function gr = gmm_divide_gauss_denominator(g1, g2) 
D = size(g1.x, 1); 
M = size(g1.x, 2); 
 
gr.w = zeros(1,M); 
gr.x = zeros(D,M); 
 
for i=1:M 
    [gr.x(:,i), gr.P(:,i), w] = gauss_divide(g1.x(:,i), g1.P(:,:,i), g2.x, g2.P); 
    gr.w(i) = g1.w * w;  
end 
 
% 
% 
 
function gr = gmm_divide_gmm_denominator(g1, g2) 
error('Approximate solution required, not yet developed'); 
 
% TODO, look at: 
% - (approximately) factoring gaussian mixtures 
% - the Fast Gauss Transform, does it offer insights? 
% - automatic factoring of polynomials, is this a similar problem? 
 
% IDEA: 
% Generalised CI by creating a PDF where each point is equal to the minimum 
% of the point in the two PDFs being fused.