Evaluation of machine learning approaches for sensor-based human activity recognition

Document Type : Research Paper


Department of Computer Science, College of Science, University of Diyala, Baqubah, Iraq


Human Activity Recognition (HAR) systems used in healthcare have attracted much attention in recent years. A HAR system consists of a wearable device with sensors. HAR has been used to suggest several machine learning (ML) algorithms. However, only a few research have looked at how to evaluate HAR to identify physical activities. Nevertheless, obtaining an explanation for their performances is complicated by two factors: the lack of implementation specifics and the lack of a baseline evaluation setup that makes comparisons unfair. For establishing effective and efficient ML–HAR of computers and networks, this study uses ten common unsupervised and supervised ML algorithms. The decision tree (DT), artificial neural network (ANN), naive Bayes (NB), k-nearest neighbor (k-NN), support vector machine (SVM), random forest (RF), and XGBoost (XGB) algorithms are among the supervised ML algorithms, while the k-means, expectation-maximization (EM), and self-organizing maps (SOM) algorithms are among the unsupervised ML algorithms. Multiple algorithms models are presented, and the turning and training parameters in ML (DT, ANN, NB, KNN, SVM, RF, XGB) of each method are investigated in order to obtain the best classifier assessment. Differ from earlier research, this research measures the true negative and positive rates, precision, accuracy, F-Score as well as recall of 81 ML-HAR models to assess their performance. Because time complexity is a significant element in HAR, the ML-HAR models training and testing time are also taken into account when evaluating their performance efficiency. The mobile health care (M\_HEALTH CARE) dataset, which includes real-world network activity, is used to test the ML-HAR models. In general, the XGB outperforms the DT-HAR, k-NN-HAR, and NB-HAR models in recognizing human activities, with recall, precision, and f-scores of 0.99, 0.99, and 0.99 for each, respectively, for health care mobile recognition.


[1] S.M. Abdulla, N.B. Al-Dabagh and O. Zakaria, Identify features and parameters to devise an accurate intrusion detection system using artificial neural network, World Acad. Sci. Eng. Technol. 46 (2010), no. 10, 626-–630.
[2] Y. Alagrash, A. Drebee and N. Zirjawi, Comparing the area of data mining algorithms in network intrusion detection, J. Info. Secur. 11 (2020), 1–18.
[3] O. Banos, R. Garcia, J.A. Holgado-Terriza, M. Damas, H. Pomares, I. Rojas and C. Villalonga, mHealthDroid: a novel framework for agile development of mobile health applications, Int. Workshop on Ambient Assisted Living, Springer, Cham. 2014, p. 91–98.
[4] X. Chen, M. Ma and A. Liu, Dynamic power management and adaptive packet size selection for IoT in e-healthcare, Comput. Electr. Eng. 65 (2018), 357-–375.
[5] K. Chen, D. Zhang, L. Yao, B. Guo, Z. Yu and Y. Liu, Deep learning for sensor-based human activity recognition: Overview, challenges, and opportunities, ACM Comput. Surv. 54 (2021), no. 4, 1—40.
[6] T. Cover and P. Hart, Nearest neighbour pattern classification, IT 13 (1967), no. 1, 1–27.
[7] N. Dua, S.N. Singh and V.B. Semwal, Multi-input CNN-GRU based human activity recognition using wearable sensors, Comput. 103 (2021), no. 7, 1461–1478.
[8] N. Farnaaz and M.A. Jabbar, Random forest modeling for network intrusion detection system, In Proc. Comput. Sci. 89 (2016), 213-–217.
[9] A. Gozzoli, Practical guide to hyperparameters optimization for deep learning models, FloydHub, 2018.
[10] S. Hamouda, A. Hassan, M.E. Wahed, M. Ail and O. Farouk, Tuning to optimize SVM approach for breast cancer diagnosis with blood analysis data, Available SSRN 3537067, (2020).
[11] I. Hanif, Implementing extreme gradient boosting (XGBoost) classifier to improve customer churn prediction, Proce. 1st Int. Conf. Statist. Anal., ICSA 2019, Bogor, Indonesia, European Alliance for Innovation, 2019.
[12] M.M. Hassan, S. Huda, M.Z. Uddin, A. Almogren and M. Alrubaian, Human activity recognition from body sensor data using deep learning, J. Med. Syst. 42 (2018), no. 6, pp. 1—8.
[13] A.A. Hassan, W.M. Shah, M.F.I. Othman and H.A.H. Hassan, Evaluate the performance of K-Means and the fuzzy C-Means algorithms to formation balanced clusters in wireless sensor networks, Int. J. Electr. Comput. Eng. 10 (2020).
[14] J.-S. Jeong, O. Han and Y.-Y. You, A design characteristics of smart healthcare system as the IoT application, Indian J. Sci. Technol. 9 (2016), no. 37.
[15] J. Jha and L. Ragha, Intrusion detection system using support vector machine, Int. J. Appl. Inf. Syst. 3 (2013), 25-–30
[16] D. Kaur, A comparative study of various distance measures for software fault prediction, arXiv preprint arXiv:1411.7474, 17 (2014), no. 3.
[17] T. Kohonen, The self-organizing mp, Proc. IEEE, 78 (1990), no. 9, 1464–1480.
[18] D.D. Lewis, Naive (Bayes) at forty: The independence assumption in information retrieval, Eur. Conf. Machine Learning, 1998, p. 4–15.
[19] Z.K. Maseer, R. Yusof, N. Bahaman, S.A. Mostafa and C.F.M. Foozy, Benchmarking of machine learning for anomaly-based intrusion detection systems in the CICIDS2017 dataset, IEEE Access 9 (2021), 22351–22370.
[20] M. Mathuria, Decision tree analysis on j48 algorithm for data mining, Int. J. Adv. Res. Comput. Sci. Softw. Eng. 3 (2013), no. 6.
[21] T.K. Moon, The expectation-maximization algorithm, IEEE Signal Process. Mag. 13 (1996), no. 6, 47—60.
[22] P. Praveen and B. Rama, A k-means clustering algorithm on numeric data, Int. J. Pure Appl. Math. 117 (2017), no. 7.
[23] J.R. Quinlan, Bagging, boosting, and C4. 5. In Aaai/iaai 1 (1996), 725—730.
[24] A.M. Rahmani, T.N. Gia, B. Negash, A. Anzanpour, I. Azimi, M. Jiang and P. Liljeberg, Exploiting smart eHealth gateways at the edge of healthcare Internet-of-Things: A fog computing approach, Futur. Gener. Comput. Syst. 78 (2018), 641-–658.
[25] C.A. Ronao and S.-B. Cho, Human activity recognition with smartphone sensors using deep learning neural networks, Expert Syst. Appl. 59 (2016), 235-–244.
[26] A. Subasi, D.H. Dammas, R.D. Alghamdi, R.A. Makawi, E.A. Albiety, T. Brahimi and A. Sarirete, Sensor based human activity recognition using AdaBoost ensemble classifier, Proc. Comput. Sci. 140 (2018), 104—111.
[27] V. Subramaniyaswamy, G. Manogaran, R. Logesh, V. Vijayakumar, N. Chilamkurti, D. Malathi and N. Senthilselvan, An ontology-driven personalized food recommendation in IoT-based healthcare system, J. Supercomput. 75 (2019), no. 6, 3184—3216.
[28] J. Sun, Y. Fu, S. Li, J. He, C. Xu and L. Tan, Sequential human activity recognition based on deep convolutional network and extreme learning machine using wearable sensors, J. Sensors 2018 (2018).
[29] H. Tahir, A. Kanwer and M. Junaid, Internet of things (IoT): An overview of applications and security issues regarding implementation, Int. J. Multidiscip. Sci. Eng. 7 (2016), no. 1, 14-–22.
[30] Q. Teng, K. Wang, L. Zhang and J. He, The layer-wise training convolutional neural networks using local loss for sensor-based human activity recognition, IEEE Sens. J. 20 (2020), no. 13, 7265—7274.
[31] P. Verma, S.K. Sood and S. Kalra, Cloud-centric IoT based student healthcare monitoring framework, J. Ambient Intell. Humaniz. Comput. 9 (2018), no. 5, 1293—1309.
[32] Y. Wang, H. Yu and S. Cang, A survey on wearable sensor modality centred human activity recognition in health care, Expert Syst. Appl. 137 (2019), 167–190.
[33] T. Wu, F. Wu, J.-M. Redoute and M.R. Yuce, An autonomous wireless body area network implementation towards IoT connected healthcare applications, IEEE Access 5 (2017), 11413—11422.
[34] K. Xia, J. Huang and H. Wang, LSTM-CNN architecture for human activity recognition, IEEE Access, 8 (2020), 56855-–56866.
[35] Y. Zhao, R. Yang, G. Chevalier, X. Xu and Z. Zhang, Deep residual bidir-LSTM for human activity recognition using wearable sensors, Math. Probl. Eng. 2018 (2018).
Volume 13, Issue 2
July 2022
Pages 1183-1200
  • Receive Date: 12 January 2022
  • Revise Date: 19 February 2022
  • Accept Date: 23 March 2022