I would like to ask you some clarifications about the definition of the ‘state duration’ vector in the context of a hidden semi-Markov model. I have found the definition of this vector in the following publication:
Azimi, M., P. Nasiopoulos, et al. (2005). "Offline and online identification of hidden semi-Markov models." IEEE Transactions on Signal Processing 53(8): 2658-2663.
According to the text, the ‘state duration’ vector d_{t} is a vector with N unit entries, except the j-th entry, which is equal to the duration d_{t}(j) spent in the j-th state prior to time t. In particular d_{t} can be calculated iteratively with the following formula:
F: d_{t} = s_{t} o d_{t-1} + 1_{N},
where ‘o’ multiplies two vectors entry by entry, 1_{N} is the vector of N all one entries, and s_{t} is the vector of N all zero entries except one, denoting the state at time t. For example if s_{t} must denote the 1st state, then s_{t} = (1,0,0,...,0).
I believe F is correct, because I have found the same formula in at least two other publications by the same authors. Maybe, I cannot interpret F correctly.
I have tried to verify F on a simple example. I have assumed only two states ‘1’ and ‘2’. Then I have considered the following sequence of states:
S_{T} = (1,1,2…),
which says that the state is 1 at time t=1, then it is again 1 at time t=2, then it turns to 2 at time t=3, and then it progresses to some arbitrary state that I ignore.
From the definition of d_{t}(j), I can deduce that:
d_{1} = (1,1), d_{2} = (2,1), d_{3} = (1,1),…
However, not all these vectors agree with formula F. For example see the following one:
d_{3} = s_{3} o d_{2} + 1_{2} = (0,1) o (2,1) + (1,1) = (0,1) + (1,1) = (1,2).
Could you please address me where I am wrong?