5.3.3. Context Effects

When the placement *L* is known, we based the models and corresponding parameters on the data generated by the specified position. Similarly, if the personalization *IP* is known, then we carried out the same process on the data of each person plus an average process. If the orientation *IO* is known, we ran the algorithms on all three axes and chose the axis with the best accuracy.

Figure 11 displays the performances of algorithms when the personalization *IP* is known. The ROC curve is better than the baseline performance. Compared to the baseline performance, the TPR of FSM and STFT is larger than 95%, and the FPR is lower at the same time. Although the TPR of DWT increases with FPR, the overall performance is poor.

Table 8 shows the TPR and FPR when the sensor is mounted on the foot. In this situation, all algorithms perform excellently except DWT and DWT2 because the detailed component of the sensor data is not remarkable. The overall performance ranking of algorithms is similar to the former experiment: STFT > FSM > PTM > DWT2 > DWT. Sensor data under this circumstance are very regular, which leads to a much better performance.

Figure 12 exhibits the ROC curve when the sensor is in the FrontPocket. The performance ranking is similar: STFT > FSM > PTM > DWT > DWT2. Unlike those former figures, STFT outperforms other algorithms overwhelmingly. FSM and PTM have a high TPR within only a short interval of FPR, which means instability in real applications.

**Figure 11.** ROC of step counting: personalization.



Figure 13 illustrates the performance of algorithms when the sensor is Hand. DWT outperforms other algorithms, and FSM is more stable than prior placements. STFT does not perform as well as other prior placements. In this case, all algorithms suffer from higher FPR compared to other prior placements, because the hand movement is diverse.

**Figure 12.** ROC of step counting: FrontPocket.

Figure 14 demonstrates the ROC curve when the sensor is in BackPocket. None of the algorithms display great differences under this situation, except that DWT2 performs too poorly to present. We could observe that it is nearly impossible to achieve a high TPR when FPR is low, while the TPR is acceptable at FPR ≈ 2%. Furthermore, the TPR is almost unchanged, although we allow larger FPR. We could find that all algorithms' TPR is high at the point of *f pr* ≈ 2%.

**Figure 14.** ROC of step counting: BackPocket.

Since it is difficult for people to do anything for a long time when walking, we abandon the evaluation of placement of HandU. Besides the influence of placements, we also investigate the influence of sensor orientation and signal sampling rate and directly gather the results into Table 9 which will be explained in the next section. If orientation is provided, we choose the axis that has the best accuracy.

Tables 9 and 10 are calculated by comparing the new performances when more contexts are available, in addition to the baseline performances.


**Table 9.** SC accuracy under various contexts (FPR ≈ 3%).


**Table 10.** WD accuracy under various contexts.
