3th, laboratory session ----------------------- Hidden Markov Models In class: understand the format of the file .hmm For one dice: ------- fair.hmm (only one state with 6 values) M= 6 N= 1 A: 1 B: 0.167 0.167 0.167 0.167 0.166 0.166 pi: 1 ------- For two dice, one fair and the other loaded, and after ten rolls the dice is changed (two states with 6 simbols) -------dishonest.hmm M= 6 N= 2 A: 0.9 0.1 0.1 0.9 B: 0.167 0.167 0.167 0.167 0.166 0.166 0.1 0.1 0.1 0.1 0.1 0.5 pi: 0.5 0.5 ------- 1. genseq creates a sequence of rolls: >genseq -T 5000 fair.hmm For instance, 5000 values under the fair.hmm model. 2. testvit: given a sequence and a model estimates the most probable sequence of states >testvit loaded.hmm filewithsequence 3. esthmm: estimates the most probable model >esthmm -N num_estat -M num_values file with sequence The validity of the results depends on the length of the sequence. WORKHOME: 1 - genseq gives the sequence of values. Change the code to obtain also the sequence of states. 2 - with this new genseq creates some sequences of rolls, and with testvit estimates, for every sequence, the most probable states. Then calculate the percentage of success. With this exercice we try to know the the reliability of the technique. 3 - Try to estimate the model with esthm. Question: is the length of the sequence of rolls a determinant factor for the success? Question: how do you estimate the number of states?