HMM (Hidden Markov Matrix) Evaluation

  • Thread starter Thread starter jiapei100
  • Start date Start date
  • Tags Tags
    Matrix
AI Thread Summary
The discussion focuses on evaluating Hidden Markov Models (HMM) using three methods: the forward algorithm, backward algorithm, and forward-backward algorithm. The user reports discrepancies between probabilities calculated by the forward and backward algorithms, suggesting a potential precision issue in their implementation. They provide specific parameters for their HMM, including initial state probabilities, transition probabilities, and observation probabilities, along with a known observation sequence. The user seeks clarification on whether the differences in results stem from precision errors or coding issues. The thread emphasizes the importance of understanding these algorithms for accurate HMM evaluation.
jiapei100
Messages
4
Reaction score
0
Hi, all:

about HMM Evaluation question:

There are 3 methods to carry out HMM evaluation.
1) forward algorithm
2) backward algorithm
3) forward-backward algorithm

Sometimes, forward algorithm and backward algorithm may not give out the same result.
Can anybody (mathematician) help to explain it clearly?

I designed my data as: 2 hidden states, 3 observations, and the sequence if of length 4

1) initial state probability of state 1 and 2: 0.6, 0.4 sequentially

2) transition probability :
from state 1 to state 1: 0.7
from state 1 to state 2: 0.3
from state 2 to state 1: 0.4
from state 2 to state 2: 0.6

3) observation probability:
from state 1 to observation 1: 0.1
from state 1 to observation 2: 0.4
from state 1 to observation 3: 0.5
from state 2 to observation 1: 0.6
from state 2 to observation 2: 0.3
from state 2 to observation 3: 0.1

4) the observation sequence is known as: 0->1->2->
that is
observation 1 to observation 2 to observation 3 to observation 1

According to my implementation, forward algorithm got the probability as: 0.0090887999999999993
while backward algorithm got the probability as: 0.0090888000000000010

I'm wondering if this is the precision problem during the computation?
Or there are some other problems hidden in my wrong coding?
(Sorry that I didn't afford my coding at this moment,
I'm guessing Julius has its own HMM to have the above simple example computed)

The difference between two probabilities using my HMM looks like a precision issue,
but I'm just not certain about this.

Can anybody give a hand to confirm this?

Cheers
JIA
 
Mathematics news on Phys.org
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Back
Top