Commit 968677b4 by Sylvain Calinon

Update to initial version of semi-tied GMM

parent d3b662f8
......@@ -9,7 +9,7 @@ The Matlab/GNU Octave version is currently maintained by Sylvain Calinon, Idiap
Did you find PbDLib useful for your research? Please acknowledge the authors in any academic publications that used parts of these codes.
<br><br>
Tutorial (covers GMM, TP-GMM, MFA, MPPCA, GMR, LWR, GPR, MPC, LQR, trajGMM):
Tutorial (GMM, TP-GMM, MFA, MPPCA, GMR, LWR, GPR, MPC, LQR, trajGMM):
```
@article{Calinon16JIST,
author="Calinon, S.",
......@@ -39,7 +39,7 @@ HMM, HSMM:
}
```
Semi-tied GMMs/HSMMs, LQT:
Semi-tied GMM:
```
@article{Tanwani16RAL,
author="Tanwani, A. K. and Calinon, S.",
......
......@@ -20,9 +20,7 @@ function demo_semitiedGMM01
% }
%
% Copyright (c) 2015 Idiap Research Institute, http://idiap.ch/
% Written by Ajay Tanwani and Sylvain Calinon
%
% Correspondence: Ajay Tanwani <http://www.ajaytanwani.com>
% Written by Ajay Tanwani (http://www.ajaytanwani.com) and Sylvain Calinon (http://calinon.ch)
%
% This file is part of PbDlib, http://www.idiap.ch/software/pbdlib/
%
......
function [model, LL] = EM_semitiedGMM(Data, model)
function [model, LL] = EM_semitiedGMM(Data, model)
% EM procedure to estimate parameters of a semi-tied Gaussian Mixture Model
%
% Writing code takes time. Polishing it and making it available to others takes longer!
......@@ -19,9 +19,7 @@
% }
%
% Copyright (c) 2015 Idiap Research Institute, http://idiap.ch/
% Written by Ajay Tanwani and Sylvain Calinon
%
% Correspondence: Ajay Tanwani <http://www.ajaytanwani.com>
% Written by Ajay Tanwani (http://www.ajaytanwani.com) and Sylvain Calinon (http://calinon.ch)
%
% This file is part of PbDlib, http://www.idiap.ch/software/pbdlib/
%
......@@ -58,12 +56,6 @@ end
if ~isfield(model,'params_nbVariationSteps')
model.params_nbVariationSteps = 50;
end
if ~isfield(model,'params_nbVariationSteps')
model.params_nbVariationSteps = 50;
end
if ~isfield(model,'params_alpha')
model.params_alpha = 1.0;
end
if ~isfield(model,'B')
model.B = eye(model.nbVar) * model.params_Bsf;
model.InitH = pinv(model.B) + eye(model.nbVar) * model.params_diagRegFact;
......@@ -107,8 +99,7 @@ for nbIter=1:model.params_nbMaxSteps
%Update Sigma
model.H = pinv(model.B) + eye(model.nbVar) * model.params_diagRegFact;
for i=1:model.nbStates
% model.Sigma(:,:,i) = model.H * model.SigmaDiag(:,:,i) * model.H'; %Eq.(3)
model.Sigma(:,:,i) = model.params_alpha*(model.H*model.SigmaDiag(:,:,i)*model.H') + (1 - model.params_alpha)*model.S(:,:,i); % Eq. (10)
model.Sigma(:,:,i) = model.H * model.SigmaDiag(:,:,i) * model.H'; %Eq.(3)
end
%Compute average log-likelihood
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment