Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/HMM/mhmmParzen_train_observed.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function [initState, transmat, mu, Nproto, pick] = mhmmParzen_train_observed(obsData, hiddenData, ... | |
2 nstates, maxNproto, varargin) | |
3 % mhmmParzentrain_observed with mixture of Gaussian outputs from fully observed sequences | |
4 % function [initState, transmat, mu, Nproto] = mhmm_train_observed_parzen(obsData, hiddenData, ... | |
5 % nstates, maxNproto) | |
6 % | |
7 % | |
8 % INPUT | |
9 % If all sequences have the same length | |
10 % obsData(:,t,ex) | |
11 % hiddenData(ex,t) - must be ROW vector if only one sequence | |
12 % If sequences have different lengths, we use cell arrays | |
13 % obsData{ex}(:,t) | |
14 % hiddenData{ex}(t) | |
15 % | |
16 % Optional argumnets | |
17 % dirichletPriorWeight - for smoothing transition matrix counts | |
18 % mkSymmetric | |
19 % | |
20 % Output | |
21 % mu(:,q) | |
22 % Nproto(q) is the number of prototypes (mixture components) chosen for state q | |
23 | |
24 [transmat, initState] = transmat_train_observed(... | |
25 hiddenData, nstates, varargin{:}); | |
26 | |
27 % convert to obsData(:,t*nex) | |
28 if ~iscell(obsData) | |
29 [D T Nex] = size(obsData); | |
30 obsData = reshape(obsData, D, T*Nex); | |
31 else | |
32 obsData = cat(2, obsData{:}); | |
33 hiddenData = cat(2, hiddenData{:}); | |
34 end | |
35 [mu, Nproto, pick] = parzen_fit_select_unif(obsData, hiddenData(:), maxNproto); | |
36 | |
37 |