Hi guys,
I have written a hidden markov model class in c++, the tests for evaluation and decoding problems was ok, but the train method wich i used the baum walch algorithm in this seems odd, for example for a model Like this:
States = { RAINY , SUNNY }
Alphabets = { WALK , CLEAN }
The initial random parameters are:
BeginningVector: RAINY = 0.113 SUNNY = 0.887
TrasitionMatrix:
Row for RAINY: RAINY = 0.985 SUNNY = 0.015
Row for SUNNY: RAINY = 0.576 SUNNY = 0.424
EmissionMatrix:
Row for RAINY: WALK = 0.123 CLEAN = 0.877
Row for SUNNY: WALK = 0.051 CLEAN = 0.949
I trained the above model with the observasion {CLEAN , CLEAN , WALK , CLEAN , CLEAN , WALK , CLEAN , WALK , WALK , CLEAN , WALK , CLEAN , CLEAN , WALK}
and the resault is this:
BeginningVector:RAINY = 0.112763 SUNNY = 0
TrasitionMatrix:
Row for RAINY: RAINY = 1.27864e-06 SUNNY = 1.27864e-06
Row for SUNNY: RAINY = inf SUNNY = inf
EmissionMatrix:
Row for RAINY: WALK = 0.469608 CLEAN = 0.530392
Row for SUNNY: WALK = 1 CLEAN = 0
This absolutely is not normal, isn't it? I checked all the formulas but nothing was wrong! What do you think??