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
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
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...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Back
Top