International Journal of Research and Innovation in Applied Science (IJRIAS)

Submission Deadline-Today
November 2024 Issue : Publication Fee: 30$ USD Submit Now
Submission Deadline-05th December 2024
Special Issue on Economics, Management, Sociology, Communication, Psychology: Publication Fee: 30$ USD Submit Now
Submission Deadline-20th November 2024
Special Issue on Education, Public Health: Publication Fee: 30$ USD Submit Now

Enhancing Human Activity Recognition with Advanced Machine Learning Techniques

  • Khadiza Tul Kobra
  • Sheikh Sadi Bandan
  • MD. Samiul Islam Sabbir
  • Md Sharuf Hossain
  • 316-322
  • Sep 6, 2024
  • Mechanical Engineering

Enhancing Human Activity Recognition with Advanced Machine Learning Techniques

1Khadiza Tul Kobra,2Sheikh Sadi Bandan,3MD. Samiul Islam Sabbir,4Md Sharuf Hossain

1Dept. of Information Technology and Management Illinois Institute of Technology Chicago, USA

2Dept. of CSE Daffodil International University Dhaka, Bangladesh

3Dept. of Computer Science & Engineering Daffodil International University Dhaka, Bangladesh

4Dept. of Data Science Loyola University Chicago, USA

DOI: https://doi.org/10.51584/IJRIAS.2024.908029

Received: 25 July 2024; Accepted: 01 August 2024; Published: 06 September 2024

ABSTRACT

One of the most popular computer research methodologies is human activity recognition, which finds application in a wide range of fields including education, gaming and amusement, healthcare, security and visual surveillance, patient rehabilitation, and human-computer interaction. Human activity identification has gained significant attention in the last ten years due to the growing usage of electronic devices to monitor human activity, including smartphones, smart watches, fitness trackers, video cameras, and ad hoc replaceable devices. A machine learning technique uses data from three axial linear acceleration and angular velocity, together with an integrated accelerometer and gyroscope sensor, to classify actual human activity. This study looks at the important role of machines in developing human activity recognition applications based on physiological and environmental sensors as well as passive sensors. And 5 machine learning algorithms such as lr (Logistic Regression), lr_l2 (Logistic Regression CV), SVM (Default Hyperparameters), SVM (Hyperparameters with Kernel), rf (Random Forest) are discussed whose accuracy is 0.9832, 0.986401, 0.9748, 0.9884, 0.9816, respectively. SVM (Hyperparameters with Kernel) has the best accuracy, which is 0.9884.

Keywords—Human Activity Recognition, Machine learning, SVM, Logistic Regression, Random Forest.

INTRODUCTION

At present, Human Activity Recognition (HAR) has become a popular and accepted topic in the last decade. As a result, healthcare, interactive gaming, sports, and general-purpose observation systems are among the most important areas [2]. None of this has been made possible by smartphones alone. In addition to the growing popularity and widespread acceptance of smartphones, mobile phones with huge amounts of sensors have opened up opportunities to embrace different types of data acquisition areas. Human movements can be analyzed using sensors. And these sensors can be used to analyze the physical activity of human beings based on the signals transmitted through mobile phones, human activity and angular rotational speed [3]. Physical activity is standing, sitting, walking, running, climbing stairs, cycling, lying, that is, we understand any moving motion [4]. The Human Activity Recognition (HAR) System is capable of identifying physical

activities such as walking, standing, sitting, etc. Identifying physical activity through a variety of sensors and recognition processes. The main topics of research are wireless, smartphone and mobile computing. Recognition systems such as standing, walking, running, sleeping, etc. can be complex human activities being able to mark and perform various tasks [5]. The sensors through which human activity is recorded or perceived for the purpose of recognizing the activity of various human activities are video sensors, environmental sensors and many more sensors such as body inertia sensors [5]. Recognizing human activity in controlled and uncontrolled settings is the main goal of Human Activity Recognition (HAR). Despite its numerous advantages and applications, the Human Activity Recognition (HAR) Algorithm still faces many challenges [6]. Many people are now living a stagnant life due to the increasing benefits of increasing technology. This proves that inadequate and unnecessary physical activity is one of the ten major risks for human death worldwide [7].

Many apps have been created to monitor people’s identities, then categorize a person’s activity after recognition, and researchers have visited the person’s activity to make a number of important suggestions. Machine learning and technology are used to monitor a person’s mobility. Despite having a variety of simple and algorithms that can identify human activity, machine learning algorithms are used to get reliable results. Commercial smartphones are used at low cost and as sensors, effective algorithms of various machine learning classifications for monitoring human mobility. The motivation behind our work is to conduct a research paper on Human Activity Recognition by collecting and studying data sets using machine learning algorithms.

LITERATURE REVIEW

Ann et al. [1] analyzed 32 research papers on RGB, depth, and wearable sensors for Human Activity Recognition, finding depth and wearable sensors more popular than RGB cameras, each having unique strengths and weaknesses depending on usage and context. Demrozi et al. [2] reviewed 23 papers on

human activity recognition, highlighting the significance of inert, physiological, and environmental sensors. They favored ML algorithms over DL for their lower data and computational needs, achieving good accuracy and activity recognition. Olasimbo et al. [3] discuss visual surveillance, patient rehabilitation, gaming, and smart homes using sensor-based data. Their study found SVM UCI-HAR achieved 96% accuracy with pre-processed data, and 97% with benchmark evaluation; WISDM RCN reached 94%. Mannini et al. [4] used wearable sensors and machine learning, including Hidden Markov Models, to classify activities like sitting and walking. They achieved 98.5% accuracy with a single-frame classifier and 99.1% with spurious data rejection. Puneeth et al. [5] present a study on human activity recognition using image classification. Their approach involves pre-processing, model creation, system training, and classification to map dataset images or videos to individual activities effectively. Micucci et al. [6] explore machine learning algorithms to classify human activity and falls using smartphones, smartwatches, and fitness trackers. They test KNN and RF on raw data, analyzing subject-dependent and independent models, and aim to enhance classifier performance by combining smartwatch and smartphone data. Gulzar et al. [7] found that neural networks and logistic regression excel in human activity recognition, with neural networks achieving 99.55% accuracy. They suggest using Neural Network Python drop-out and Logistic Regression Standard model with a loss function for improved results.

RESEARCH METHODOLOGY

A. Machine Learning Overview

A subfield of artificial intelligence called machine learning is able to recognize and deduce patterns from training datasets in order to build algorithms. This means that any program can learn in advance without writing. There are two main algorithms such as Supervised and unsupervised algorithms.

Supervised algorithms enable computers to mimic human thinking by creating mathematical models to predict future data and understand input-output relationships. Unsupervised learning, in contrast, identifies patterns in input data without prior knowledge of outcomes, allowing the system to autonomously detect patterns. Common supervised machine learning (ML) algorithms include LR, NB, RF, SVM, DT, and KNN. Data sorting is based on properties, with each node representing a classification property and branches representing values. The NB classifier predicts outcomes based on Bayes’ theorem, assuming strong independence of properties. SVM separates two data classes via a hyperplane, while KNN classifies new data points by categorizing similar data points into different groups.

Among unsupervised algorithms, particularly clustering techniques, the most well-known include K-Means, hierarchical clustering, and mixture models. K-Means clustering organizes unlabeled data into different clusters by dividing samples into K clusters based on similarity and dissimilarity measures. Hierarchical clustering aims to create a hierarchy of clusters by

grouping them according to differences between sets. Mixture models represent sub-populations within the overall population without assuming data points belong to any specific sub-population, allowing the model to automatically learn and identify these sub-populations.

B. Design Approach

This flowchart depicts a machine learning process. It begins with Data Acquisition, which then moves to Data Pre-processing. During pre-processing, sub features are sampled, followed by a Testing/Training phase. The data is then processed through three different algorithms: Support Vector Machine (SVM), Random Forest, and Logistic Regression (LR). The output from these algorithms is directed towards Experimentation, which involves both Testing and Training phases. This structured approach ensures that the data undergoes thorough preparation, model training, and validation before final experimentation.

Architecture of Working Process

Fig. 1. Architecture of Working Process

C. Dataset Description

The primary dataset for this study was derived from smartphone accelerometer and gyroscope data, covering six activities: walking, walking upstairs, walking downstairs, sitting, standing, and lying. We captured 3-axial angular velocity and linear acceleration using these sensors. The dataset was segmented into 2948 samples for testing and 7352 for training, representing a 70% training and 30% testing split. The pre-processing module prepared the dataset images. The model was trained using the training dataset and the model structure was saved for future use.

Table 1: Classifiers Description

Category Name Description Label
Motion-related Standing From laying or sitting to standing StandingFromLay/Sit
Sitting From standing or laying to sitting SittingFromStand/Lay
Laying From standing or sitting to laying LayingFromStand/Sit
Walking Normal walking Walking
Walking downstairs Climb the stairs moderately DownS
Walking upstairs Down the stairs moderately UpS

Class wise Separate Image

Fig. 2. Class wise Separate Image

Data visualization is shown here. By classifying the data in our dataset, those classes are shown through visualization. Activity name description and data visualization is shown figure 2 and 3. Also mathematical parameters and parameter descriptions are given by figure 4. By classifying the data in our dataset, those classes are shown through visualization.

D. Data Preprocessing

The data in question identifies the device and generates information. However, the data is characterized by words, the use of which becomes difficult in the raw state. Raw data is pre-processed to eliminate the presence of noise. Data is also prepared on recognized models for feeding. Preprocessing is one of the most important steps in HAR, where the quality of the image is improved so that it can be better analyzed. Unwanted distortions can be suppressed through pre-processing and these features can be modified for specific applications. such as feature extraction and data normalization using statistical and digital filters. preserves an overlapping portion between two successive segments in various ways as well. The model is presented in this part having the prior background in mind.

  1. make_data(): Convert pandas data frame to NumPy arrays.
  2. head() = Train 70% data from train.csv.
  3. head() = Test 30% data from test.csv.
  4. train drop() = Unusual column will drop from train datasets.
  5. test drop() = Unusual column will drop from test datasets.
  6. dtypes.value_counts() = Count the activity value.
  7. description() = Using this method for exclude the activity column.
  8. Activity() = Count the activity value.
  9. head() = Using the pandas method for calculating correlation between data frame columns.
  10. LogisticRegression() = To predict the probability of a target variable.
  11. Confusion_matrix() = Evaluating the performance of a classification model.
  12. SVM = To predict SVM model accuracy.
  13. Random Forest = To predict RF model accuracy.
  14. tight_layout() = Plots the history (accuracy and loss) of model.
  15. accuracy_score() = Print the goodness of classifier suitability.

Confusion Matrix for MobileNet V3

Fig. 3. Confusion Matrix for MobileNet V3

EXPERIMENTAL RESULTD AND DISCUSSION

A. Overall Classification Report

Logistic regression (lr) gives 0.983251 accuracy by precision matrix, 0.983228 accuracy by recall matrix, 0.983235 accuracy by f_score and 0.983228 accuracy by accuracy matrix. Logistic regression CV (lr_l2) gives 0.986408 accuracy by precision matrix, 0.986401 accuracy by recall matrix, 0.986399 accuracy by f_score and 0.986401 accuracy by accuracy matrix. SVM (Default Hyperparameters) gives 0.9748 accuracy by precision matrix, 0.9747 accuracy by recall matrix, 0.9749 accuracy by f_score and 0.9748 accuracy by accuracy matrix. SVM (Hyperparameters with Kernel) gives 0.9883 accuracy by precision matrix, 0.9884 accuracy by recall matrix, 0.9885 accuracy by f_score and 0.9884 accuracy by accuracy matrix. The random forest classifier (RF) gives 0.9816 accuracy by precision matrix, 0.9817 accuracy by recall matrix, 0.9815 accuracy by f_score and 0.9816 accuracy by accuracy matrix. Here we can see that the analysis of lr (Logistic Regression), lr_l2 (Logistic Regrission CV), SVM (Default Hyperparameters), SVM (Hyperparameters with Kernel) and rf (Random Forest) algorithms shows that SVM (Hyperparameters with Kernel) has the best accuracy, which is 0.9884 and SVM (Default Hyperparameters) has the lowest accuracy, which is 0.9748. The second-best accuracy of lr_l2 (Logistic Regression CV), which is 0.986401. The third best accuracy of lr (Logistic Regression), which is 0.983228. And rf (Random Forest) has the fourth best accuracy, which is 0.9816.

Table 2: Classifiers Description

TABLE 2 CLASSIFIERS DESCRIPTION

Confusion Matrix for MobileNet V3

Fig. 4. Confusion Matrix for MobileNet V3

Discussion

Here we can see that the SVM (Default Hyperparameters) gave the lowest accuracy of 0.9748 and the highest accuracy of 0.9884 on SVM (Hyperparameters with Kernel). Also, lr (Logistic Regression), lr_l2 (Logistic Regression CV) and Random Forest Classifier provided accuracies of 0.983228, 0.986401 and 0.9816 respectively.

Table 3: Classifiers Description

Classifier Classification Accuracy
lr (Logistic Regression) 0.983228
lr_l2 (Logistic Regrission CV) 0.986401
SVM (Default Hyperparameters) 0.9748
SVM (Hyperparameters with Kernel) 0.9884
Random Forest Classifier 0.9816

We found in the research paper that SVM default hyperparameters with pre-processed data from Keggel dataset gave 97.48% accuracy. In addition, we derived the SVM using kernel functions, because kernel functions are used for large datasets and complex computations to obtain accurate computations. The accuracy obtained using the kernel function is 98.84%. As the dataset is large, the SVM kernel function is used and better results are obtained using the SVM kernel function than the SVM default hyperparameters. lr (Logistic Regression), lr_l2 (Logistic Regression CV) and Random Forest Classifier algorithms are also used on the dataset with accuracies of 98.32%, 98.64% and 98.16% respectively. The accuracies of the lr_l2 (Logistic Regression CV) algorithm and the SVM kernel function were very close. Again, the accuracy of lr (Logistic Regression) algorithm and Random Forest algorithm was very close. A review of these five classifier algorithms shows that the SVM kernel function gives the best result with an accuracy of 98.84% and the SVM using the default hyperparameter gives the lowest result with an accuracy of 97.48%.

CONCLUSION

Human activity recognition is mainly used in gaming, entertainment, education, and human-computer interaction, as well as in the use and testing of electronic devices such as smartphones, smart watches, video cameras, fitness trackers, etc. Based on all these categories, the dataset has been divided into several parts and various algorithms have been applied and

their accuracy has been verified. We used several machine learning algorithms like lr (Logistic Regression), lr_l2 (Logistic Regression CV), SVM (Default Hyperparameters), SVM (Hyperparameters with Kernel), rf (Random Forest). Among which SVM (Hyperparameters with Kernel) has the best accuracy, which is 0.9884 and SVM (Default Hyperparameters) has the lowest accuracy, which is 0.9748.

REFERENCES

  1. Ann, O.C. and Theng, L.B. (2015) “Human Activity Recognition: A Review,” IEEE International Conference on Control System, Computing and Engineering, pp. 389–393. Available at: https://doi.org/10.1109/ICCSCE.2014.7072750.
  2. Demrozi, F. et al. (2020) “Human activity recognition using inertial, physiological and Environmental Sensors: A comprehensive survey,” IEEE Access, 8, pp. 210816–210836. Available at: https://doi.org/10.1109/access.2020.3037715.
  3. Olasimbo and Arigbabu, A. (2020) “Entropy Decision Fusion for Smartphone Sensor-based Human Activity Recognition.” Available at: https://doi.org/10.48550/arXiv.2006.00367.
  4. Mannini, A. and Sabatini, A.M. (2010) “Machine learning methods for classifying human physical activity from on-body accelerometers,” Sensors, 10(2), pp. 1154–1175. Available at: https://doi.org/10.3390/s100201154.
  5. Puneeth, et al. “Human Activity Recognition Using Machine Learning.” International Journal of Research in Engineering, Science and Management, vol. 4, no. 7, July 2021, pp. 253–255.
  6. Micucci, D., Mobilio, M. and Napoletano, P. (2017) “UniMiB Shar: A dataset for human activity recognition using acceleration data from smartphones,” Applied Sciences, 7(10). Available at: https://doi.org/10.20944/preprints201706.0033.v1.
  7. Gulzar, Z., Leema, A. and I.Malaserene (2019) “Human Activity Recognition using Machine Learning Classification Techniques,” International Journal of Innovative Technology and Exploring Engineering (IJITEE), 9(2), pp. 3252–3258. Available at: https:// doi.org/ 10 .35940/ijitee.B7381.129219.
  8. S.S. Bandan, M. Rahman Ajmain, A. R. Rejuan, M. Farhana Khatun and S. A. Khushbu, “State of Survey: Advancement of Knowledge Environmental Sustainability in Practicing Administrative Apps,” 2022 13th International Conference on Computing Communication and Net- working Technologies (ICCCNT), 2022, pp. 1-8, doi: 10.1109/ICC- CNT54 827 .2022 .9984416.
  9. M.R. Ajmain, M. F. Khatun, S. S. Bandan, A. R. Rejuan, N. J. Ria and S. H. Noori, “Enhancing Sentiment Analysis using Machine Learning Predictive Models to Analyze Social Media Reviews on Junk Food,” 2022 13th International Conference on Computing Communication and Networking Technologies (ICCCNT), 2022, pp. 1-7, doi: 10.1109/ICC- CNT54 827. 2022 .9984355.
  10. M.A. R. Rejuan, S. S. Bandan, M. A. Rakib and M. Assaduzzaman, “A Comparative Study For Measuring The Quality of Dhaka City Transportation System: Survey Based,” 2023 International Conference for Advancement in Technology (ICONAT), Goa, India, 2023, pp. 1-8, doi: 10.1109/ICONAT57137.2023.10080188.
  11. Sheikh Sadi Bandan, Sabid Ahmed Sunve, and Shaklian Mostak Romel, “A Deep Learning Approach for Bengali News Headline Categorization,” Jul. 2023, doi: https:// doi.org/ 10. 11 09/icccnt56998.2023.10307776.

Article Statistics

Track views and downloads to measure the impact and reach of your article.

3

PDF Downloads

45 views

Metrics

PlumX

Altmetrics

Paper Submission Deadline

GET OUR MONTHLY NEWSLETTER