Mercurial > hg > flst
comparison matlab/flstViterbiUpdate.m @ 1:4283604499f8 tip
added mini probability to delta (not sure if this is a good idea, but I did it)
author | matthiasm |
---|---|
date | Mon, 10 Nov 2014 19:38:49 +0000 |
parents | 1df4a6fb0d22 |
children |
comparison
equal
deleted
inserted
replaced
0:1df4a6fb0d22 | 1:4283604499f8 |
---|---|
34 if (currentValue > d.delta(toState)) | 34 if (currentValue > d.delta(toState)) |
35 d.delta(toState) = currentValue; % will be multiplied by the right obs later! | 35 d.delta(toState) = currentValue; % will be multiplied by the right obs later! |
36 tempPsi(toState) = fromState; | 36 tempPsi(toState) = fromState; |
37 end | 37 end |
38 end | 38 end |
39 d.delta = d.delta .* obsLik; | 39 % d.delta = d.delta .* obsLik; |
40 d.delta = d.delta .* obsLik + eps; | |
40 deltaSum = sum(d.delta); | 41 deltaSum = sum(d.delta); |
41 | 42 |
42 if deltaSum > 0 | 43 if deltaSum > 0 |
43 d.oldDelta = d.delta / deltaSum; % normalise (scale) | 44 d.oldDelta = d.delta / deltaSum; % normalise (scale) |
44 d.scale(d.memory) = 1.0/deltaSum; | 45 d.scale(d.memory) = 1.0/deltaSum; |