**6. Conclusions**

This paper introduces context factors to evaluate walk detection and step counting algorithms through a series of experiments. Additionally, to the best of our knowledge, the method that uses ROC to evaluate the step counting is new and more comprehensive.

Table 10 shows the context impacts on WD algorithms. We find that different context factors have different effects on the algorithm performance. Amongst all algorithms, heuristic methods (THR) are the most robust to various context changes, while signal processing methods are most sensitive to changes in placement, window size and sampling rate. Machine learning methods have the best performance when a predefined context is given compared to the baseline performance and could be further improved if more contexts are provided.

Table 9 shows the context impacts on SC algorithms. The contribution of orientation is not obvious, while the contribution of personalization could remarkably enhance the overall accuracy except for the DWT algorithm. Besides, all SC algorithms are sensitive to placements, and each placement has its own best algorithm. Finally, when the sampling rate is larger than 20 Hz, the performance of all algorithms remains robust.

This paper seeks to establish a connection between activity recognition and context awareness. By presenting a quantitative comparison of algorithm performance under context impacts, this paper gives valuable guidance in designing algorithms for walk detection and step counting.

**Author Contributions:** Investigation, B.A.; Methodology, B.A.; Project administration, Y.W.; Resources, D.L.; Software, B.A.; Validation, H.L.; Writing—review & editing, L.S. and J.L.

**Funding:** This work was supported in part by the National Natural Science Foundation of China Grant Nos. 11671400, 61672524; the Fundamental Research Funds for the Central University, and the Research Funds of Renmin University of China, 2015030273.

**Acknowledgments:** The authors would like to thank all individuals who contributed to the experiments of collecting data.

**Conflicts of Interest:** The authors declare no conflict of interest.
