Skip to content
Snippets Groups Projects
Commit 6e3eeead authored by Leonel Rozo's avatar Leonel Rozo
Browse files

First version of a function computing the product of Gaussians

parent 3085003d
No related branches found
No related tags found
No related merge requests found
function [Mu, Sigma] = gaussianProduct(model, p)
% Leonel Rozo, 2014
%
% Compute the product of Gaussians for a task-parametrized model where the
% set of parameters are stored in the variable 'p'.
% GMM products
for i = 1 : model.nbStates
% Reallocating
SigmaTmp = zeros(model.nbVar);
MuTmp = zeros(model.nbVar,1);
% Product of Gaussians
for m = 1 : model.nbFrames
MuP = p(m).A * model.Mu(:,m,i) + p(m).b;
SigmaP = p(m).A * model.Sigma(:,:,m,i) * p(m).A';
SigmaTmp = SigmaTmp + inv(SigmaP);
MuTmp = MuTmp + SigmaP\MuP;
end
Sigma(:,:,i) = inv(SigmaTmp);
Mu(:,i) = Sigma(:,:,i) * MuTmp;
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment