Transition matrix dimension
nurgasemetey opened this issue · 3 comments
nurgasemetey commented
traveltimeHMM/R/traveltimeHMM.R
Line 258 in dd215b5
Hello,
When I was reading your code, I noticed that transition matrix is not square? Why is it so?
melmasri commented
Each row is a transition matrix. nQ2
is the square of the number of states nQ
. Therefore, each row is for a time bin and a link, and the columns are the transition probability. I do this for vectorization.
nurgasemetey commented
melmasri commented
If you notice \Gamma
is indexed by R_{i,k}
and not {i,k}
only. R_{i,k}
is a specific road in the map. Hence for each specific road, for each time bin (R_{i,k}, b_{i,k})
you get a transition matrix. When Q=2
the transition matrix is 2x2
, hence the row format would have 4 cells.