Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/inference/online/@hmm_2TBN_inf_engine/back.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 b = back(engine, bfuture, f, t) | |
2 | |
3 if f.t ~= t | |
4 error('mixed up time stamps') | |
5 end | |
6 | |
7 b.t = t; | |
8 b.obslik = f.obslik; | |
9 bb_future = bfuture.beta .* bfuture.obslik; | |
10 if engine.maximize | |
11 B = repmat(bb_future(:)', length(bfuture.beta), 1); | |
12 b.beta = normalise(max(engine.transprob .* B, [], 2)); | |
13 else | |
14 b.beta = normalise((engine.transprob * bb_future)); | |
15 end | |
16 b.gamma = normalise(f.alpha .* b.beta); | |
17 if t > 1 | |
18 bb_t = b.beta .* b.obslik; | |
19 b.xi = normalise((engine.transprob .* (f.past_alpha * bb_t'))); % t-1,t | |
20 end | |
21 |