Classifying Human Activities using Machine Learning and Deep Learning Techniques

Sanku Satya Uday,Satti Thanuja Pavani,T.Jaya Lakshmi,Rohit Chivukula
DOI: https://doi.org/10.48550/arXiv.2205.10325
2022-05-19
Abstract:Human Activity Recognition (HAR) describes the machines ability to recognize human actions. Nowadays, most people on earth are health conscious, so people are more interested in tracking their daily activities using Smartphones or Smart Watches, which can help them manage their daily routines in a healthy way. With this objective, Kaggle has conducted a competition to classify 6 different human activities distinctly based on the inertial signals obtained from 30 volunteers smartphones. The main challenge in HAR is to overcome the difficulties of separating human activities based on the given data such that no two activities overlap. In this experimentation, first, Data visualization is done on expert generated features with the help of t distributed Stochastic Neighborhood Embedding followed by applying various Machine Learning techniques like Logistic Regression, Linear SVC, Kernel SVM, Decision trees to better classify the 6 distinct human activities. Moreover, Deep Learning techniques like Long Short-Term Memory (LSTM), Bi-Directional LSTM, Recurrent Neural Network (RNN), and Gated Recurrent Unit (GRU) are trained using raw time series data. Finally, metrics like Accuracy, Confusion matrix, precision and recall are used to evaluate the performance of the Machine Learning and Deep Learning models. Experiment results proved that the Linear Support Vector Classifier in machine learning and Gated Recurrent Unit in Deep Learning provided better accuracy for human activity recognition compared to other classifiers.
Machine Learning,Signal Processing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is **how to accurately classify six different human activities**. Specifically, the research objective is to identify and classify the following six human activities from the raw time - series data obtained from the inertial sensors (such as accelerometers and gyroscopes) of smart phones: 1. Walking (WALKING) 2. Walking upstairs (WALKING UPSTAIRS) 3. Walking downstairs (WALKING DOWNSTAIRS) 4. Sitting (SITTING) 5. Standing (STANDING) 6. Lying (LAYING) ### Problem Description The paper points out that the main challenge in human activity recognition (HAR, Human Activity Recognition) lies in how to distinguish different activities based on the given data and ensure that no two activities overlap. To meet this challenge, the researchers used the `UCI_HAR_Dataset` dataset on the Kaggle platform provided by UCI. This dataset contains the three - axis linear acceleration and three - axis angular velocity data collected by the accelerometers and gyroscopes of smart phones (Samsung Galaxy S II) when 30 volunteers were performing the above six activities. ### Multi - class Classification Problem Since the prediction is not binary but choosing one from six activities, this is a **multi - class classification problem**. The specific task is to build a multi - class classification model that can predict the corresponding activity type based on a 128 - dimensional feature vector (generated from accelerometer and gyroscope signals). ### Dataset Description - **Raw Time - series Data**: It includes three - axis acceleration and three - axis angular velocity data, with a total of 10,299 data points, and each data point has 128 dimensions. - **Expert - generated Features**: By processing the raw time - series data, 561 features (such as `tBodyAcc - mean()`, `tBodyAcc - std()` etc.) were generated for training machine learning models. ### Methods and Models To achieve this goal, the paper adopted the following methods: 1. **Data Visualization**: Use t - SNE (t - Distributed Stochastic Neighbor Embedding) to reduce the dimension of high - dimensional data and visualize it to better understand the data distribution. 2. **Machine Learning Models**: Applied multiple classic machine learning algorithms, such as Logistic Regression, Linear SVC (Linear Support Vector Machine), Kernel SVM (Kernel Support Vector Machine), Decision Trees, etc. 3. **Deep Learning Models**: Used deep learning techniques such as Long - Short - Term Memory Network (LSTM), Bidirectional LSTM (Bi - LSTM), Recurrent Neural Network (RNN) and Gated Recurrent Unit (GRU) to directly extract features from the raw time - series data and perform classification. ### Results The experimental results show that among the machine learning models, **Linear SVC (Linear Support Vector Machine)** performs the best, achieving an accuracy of 96.7%; while among the deep learning models, **Gated Recurrent Unit (GRU)** performs the best, with an accuracy rate of 92.60%. However, all models have some confusion when distinguishing between the two static activities of "sitting" and "standing" because these two types of activities are very similar in data. ### Conclusions and Future Work Although machine learning models perform better on expert - generated features, deep learning models also show strong capabilities when dealing with raw time - series data. Future research can further optimize the models to reduce the confusion of static activities, thereby improving the accuracy of smart watches and other devices in tracking and recording users' daily activities.