4.3 The Coxian Hidden semi-Markov Model
4.4.3 Experiments with missing observation dataset A
This section experiments with dataset A, which has some sequences containing miss- ing observations. In both the learning and recognition phases, missing entries in the observation vectors are treated as hidden (theory in sections 4.3.4.2 and 4.3.5.3). First, we look at how the dierent models have learned the state durations. Fig. (4.11) shows the duration spent at the table in activity (a.3) learned by the PsHSMM, the IgHSMM, the MuHSMM, and the 5-ph.CxHSMM. While the Poisson fails to learn accurate duration information, the rest, especially the Coxian and the Multi- nomial, have captured, relatively well, the mixture of two typical durations: 3-4(s), and 19-21(s) (the statistics of empirical durations is shown in Tab. (4.3)). The Cox- ian has not fully separated the two peaks but successfully smoothed the spikes in the durations in comparison with the Multinomial.
In addition, Fig. (4.12) shows the log likelihood learned from the dataset of activity (a.3) by all the models. Due to their simplicity the HMM and the PsHSMM quickly converge after about 4 iterations; while the IgHSMM requires about 20 iterations, both the MuHSMM and 5-ph.CxHSMM take up to 25 iterations. However, the learn- ing time is well worth it as they deliver much higher performance as discussed below. Tab. (4.4)(c) shows that the HMM performs worst with only 68% classication accuracy due to its incapacity to model non-geometric durations. The PsHSMM performance is almost equally poor (69% accuracy), possibly because the Pois- son is not exible enough (i.e. having only one parameter) to model complicated state occupancies. The IgHSMM (76% accuracy) performs almost comparably to the 2-ph.CxHSMM (78% accuracy), but is completely surpassed by any M ≥ 3-ph.CxHSMMs. The disadvantage of the Inverse Gaussian model is possibly be-
4.4. Applications with the CxHSMM: recognition of activities of the same category 109 0 20 40 60 0 0.05 0.1 0.12 duration (s) 0 20 40 60 0 0.05 0.1 duration (s) 0 20 40 60 0 0.1 0.2 0.3 duration (s) 0 20 40 60 0 0.05 0.1 0.135 duration (s) (a) (c) (b) (d)
Figure 4.11: The duration distribution of state at-table in activity (a.3) learned by: (a) the PsHSMM, (b) the IgHSMM, (c) the MuHSMM, and (d) the 5-ph.CxHSMM.
4.4. Applications with the CxHSMM: recognition of activities of the same category 110 5 10 15 20 25 −2600 −2500 −2400 −2300 −2200 −2100 −2000 −1900 −1800 −1700 iteration no. log likelihood (a) The 5-ph.CxHSMM. 5 10 15 20 25 −2600 −2400 −2200 −2000 −1800 −1600 iteration no. log likelihood (b) The MuHSMM. 5 10 15 20 25 −2400 −2300 −2200 −2100 −2000 −1900 −1800 −1700 −1600 iteration no. log likelihood (c) The IgHSMM. 1 2 3 4 5 6 7 8 9 10 −3750 −3700 −3650 −3600 −3550 −3500 −3450 −3400 iteration no. log likelihood (d) The PsHSMM. 2 4 6 8 10 12 14 −5000 −4500 −4000 −3500 −3000 −2500 −2000 iteration no. log likelihood (e) The HMM.
4.4. Applications with the CxHSMM: recognition of activities of the same category 111 cause of its approximation to the discrete domain and the additional approximation during EM learning. Nevertheless, the most signicant result is that the best accu- racy (91.39%) is achieved with M = 5, a relatively small number, thus indicating the Coxian as a promising choice for modeling ADLs. In addition, the early detec- tion rates (EDRs) in Tab. (4.5) show that on average the 5-ph.CxHSMM is capable of recognizing activities as early as 18.38% of their lifetime, which is earlier than other M -phase models. Furthermore, across all activities the 5-ph.CxHSMM has an upper bound of less than 28% EDR, as compared to 35% (or above) for all other values of M. In comparison with the 5-ph.CxHSMM, at the heavy expense of com- putational cost, the MuHSMM performs slightly better with an average of 95.56% for accuracy and 15.59% for EDR2.
It is further observed that most models generally detect activity (a.1) accurately and early, while sometimes confusing the other two activities. This is consistent with the fact that activities (a.2) and (a.3) share more common durations as shown in Tab. (4.3). Fig. (4.13) illustrates an example of online recognition performed by the 5-ph.CxHSMM for a randomly chosen sequence of activity (a.2).
The comparison between the HMM and the CxHSMM shows us that by simply adding one more geometric phase (extending from HMM to 2-ph.CxHSMM) the Markov model can be improved signicantly in applications, in particular the accu- racy increases from 68.02% to 78.61% (Tab. (4.4)(a & c)), and by adding a few more geometric phases (the 5-ph.CxHSMM), we can achieve much better performance (91.39% - Tab. (4.4)(a)). In addition, the model performance slightly decreases for M ≥ 6, making M = 5 the best number of phases for this data.
Regarding running time, theoretically the M-ph.CxHSMM time scales up linearly by its phase number M, while the MuHSMM and the Exponential Family HSMM (including PsHSMM and IgHSMM) scale up by the maximum duration length M. In our experiment the best performance is achieved with M = 5, while M is in the range of [100, 120], depending on each activity. Thus, the Coxian is far bet- ter than any other model in computational time by a theoretical factor of 20 − 24 times. It is also worthy to noting that compared to the Multinomial duration model,
2We have smoothed the Multinomial duration to get rid of the spikes by a moving average, the
4.4. Applications with the CxHSMM: recognition of activities of the same category 112
M = 2(avg.78.61%) M = 3 (avg.89.03%) M = 4 (avg.85.00%)
(a.1) (a.2) (a.3) (a.1) (a.2) (a.3) (a.1) (a.2) (a.3)
(a.1) 100 0 0 100 0 0 94.12 5.88 0
(a.2) 0 62.50 37.50 0 93.75 6.25 0 75.00 25.00
(a.3) 13.33 13.33 73.34 0 26.67 73.33 0 20.00 80.00
(a) Tested on dierent M-ph.CxHSMMs.
M = 5(avg.91.39%) M = 6 (avg.89.44%) M = 7 (avg.89.17%)
(a.1) (a.2) (a.3) (a.1) (a.2) (a.3) (a.1) (a.2) (a.3)
(a.1) 100 0 0 100 0 0 100 0 0
(a.2) 0 87.50 12.50 0 75.00 25.00 0 87.50 12.50
(a.3) 0 13.33 86.67 0 6.67 93.33 0 20.00 80.00
(b) Tested on dierent M-ph.CxHSMMs.
HMM (avg.68.02%) PsHSMM (avg.69.05%) IgHSMM (avg.76.53%) MuHSMM (avg.95.56%)
(a.1) (a.2) (a.3) (a.1) (a.2) (a.3) (a.1) (a.2) (a.3) (a.1) (a.2) (a.3)
(a.1) 88.24 0 11.76 58.82 17.65 23.53 100 0 0 100 0 0
(a.2) 0 62.50 37.50 0 75.00 25.00 0 56.25 43.75 0 100 0
(a.3) 13.33 33.33 53.33 0 26.67 73.33 0 26.67 73.33 0 13.33 86.67
(c) Tested on other models.
Table 4.4: Classication accuracy with the data containing missing observations using the HSMM variants and the HMM.
HMM PsHSMM IgHSMM MuHSMM M= 2 M= 3 M= 4 M = 5 M= 6 M= 7
(a.1) 9.12 31.54 7.99 8.97 7.12 6.47 8.35 7.26 7.70 7.84
(a.2) 37.28 13.89 47.72 11.77 31.28 11.41 31.39 20.31 25.99 17.72
(a.3) 42.57 43.96 31.96 26.03 41.76 39.93 56.23 27.56 34.47 52.29
Avg. 29.66 29.80 29.22 15.59 26.72 19.27 31.99 18.38 22.72 25.95
Table 4.5: Early Detection Rate with data containing missing observations using the HSMM variants and the HMM.
4.4. Applications with the CxHSMM: recognition of activities of the same category 113 0 20 40 60 80 100 120 −0.45 −0.4 −0.35 −0.3 −0.25 time (s)
the normalized log likelihood
model θ 1 model θ 2 model θ 3
Figure 4.13: Example of online recognition for an unseen sequence of activity (a.2) obtained from the 5-ph.CxHSMM. Model θi is trained from the set of activities
4.4. Applications with the CxHSMM: recognition of activities of the same category 114 the Coxian duration model requires a signicantly less number of free parameters: 2 × M − 1 = 9 vs. M − 1 ≈ 114. Fig. (4.14) shows our MATLAB computation time for one EM iteration run on ten sequences randomly chosen from activities (a.1) to (a.3). The empirical speed up factor goes from 7 times for the rst four sequences, which are from activity (a.1) whose lengths are shortest among the three activity types, to 10 times for the next three sequences taken from activity (a.2), whose lengths are the generally longest. While the CxHSMM computation time does not increase noticeably with the activity length (i.e. (a.1) v.s (a.2)), the MuHSMM does suer considerably more computational cost as it moves from activity (a.1) to (a.2). The dierence between theoretical and empirical speed up factor is due to the actual implementation. In our MATLAB work we have used matrix tricks to signicantly speed up the MuHSMM; however, it is impossible to bring it up to the same speed with the CxHSMM and the gap becomes wider as the activity length increases.
Therefore, in comparison with the PsHSMM and the IgHSMM, the CxHSMM is far better, not only in performance but also in running time; whereas in comparison with the MuHSMM the CxHSMM achieves a comparable performance level, but at a fraction of the computational time. We believe that the computational speedup achieved is extremely crucial for semi-Markov models to have their real-world ap- plications, as activity lengths can be arbitrarily long.