PAMAP2 Activity Classification: Comparative Analysis of Models
PAMAP2 Activity Classification: Comparative Analysis of Models
This study presents a comprehensive comparative analysis of different models for activity classification using the PAMAP2 dataset. Human activity recognition plays a crucial role in various domains, including healthcare monitoring, sports performance analysis, and human-computer interaction. The accurate classification of activities based on sensor data collected from wearable devices is essential for developing effective and personalized applications in these fields.
The PAMAP2 dataset has emerged as a valuable resource for activity recognition research. It consists of sensor data recorded from 9 inertial measurement units worn by participants during 18 different physical activities. The dataset includes measurements from accelerometers, gyroscopes, and magnetometers, providing rich information about participants' movements and orientations during various activities.
In this analysis, a range of classification models is explored, including Decision trees, Random forests, k-nearest neighbors (KNN), Logistic regression, naive Bayes, and Adaboost Classifier. Each model is trained and evaluated on the PAMAP2 dataset using common evaluation metrics such as accuracy, precision, recall, and F1 score. These metrics provide a comprehensive assessment of the models' performance in accurately predicting different activities.
Furthermore, the analysis delves into the impact of feature selection, preprocessing techniques, and parameter tuning on the models' performance. Feature selection plays a crucial role in identifying relevant sensor data that contribute most to activity classification. Preprocessing techniques such as data cleaning, normalization.
The findings of this comparative analysis provide valuable insights into the strengths and weaknesses of each classification model. Researchers and practitioners can leverage this information to select the most appropriate model for activity classification tasks using the PAMAP2 dataset. The analysis sheds light on the effectiveness of different models in distinguishing between activities and highlights the factors that significantly impact their performance.
In conclusion, this study contributes to the advancement of activity classification techniques using the PAMAP2 dataset. By exploring various models and evaluating their performance, this analysis enables the identification of accurate and efficient approaches for activity recognition. The outcomes of this study have practical implications for the development of real-world applications that rely on accurate activity classification, promoting improved healthcare monitoring, enhanced sports performance analysis, and more intuitive human-computer interaction.
About Dataset:
The PAMAP2 (Physical Activity Monitoring and Assessment System) dataset was developed by a team of researchers at the University of Twente in the Netherlands.
The dataset used is PAMAP2 which is an Activity Monitoring dataset that covers 18 different physical activities which are taken by 9 different subjects (8 men and 1 woman) taken using 3 inertial measurement units and a heart rate monitor. Different persons sensors data have different .data file (space separated). And some extra activity also done by subjects which are under Optional folder.(Not Used for this Project).
Total Dataset have 2872533 data, 54 Attributes.
What is IMU sensors?
Inertial measurement units contain an accelerometer, gyroscope, and magnetometer. The accelerometer measures acceleration, while the gyroscope measures angular velocity. Each of these measurements is represented in a three-axis coordinate system.
- Sensor position:
1 IMU over the wrist on the dominant arm
1 IMU on the chest
1 IMU on the dominant side's ankle
The data files contain 54 columns: each line consists of a timestamp, an activity label, and 52 attributes of raw sensory data (from sensors devices) placed on hand, chest and ankle. (all information provided into readme.pdf file in dataset)
Data used in this notebook can be found and downloaded from:
https://archive.ics.uci.edu/ml/datasets/pamap2+physical+activity+monitoring
I apply classification model as our data seta have multi-class.
We will Apply different multiclass Classifer on training data include DecisionTreeClassifier, GaussianNB, KNeighborsClassifier,LogisticRegression, RandomForestClassifier, AdaBoostClassifier.
After fitting and the models, predict for the test data. We record or calculate
Accuracy, Precision, Recall and F1-score.
Accuracy, Precision, Recall, and F1-score are commonly used evaluation metrics for classification models. These metrics provide insights into the performance of a classification model in different aspects.
In our study, we explored the effectiveness of various classification models for activity recognition on the PAMAP2 dataset. We trained and evaluated several models using different machine learning algorithms and techniques. Here are the results obtained from our experimentation:
In conclusion, our experiments on activity classification using machine learning models on the PAMAP2 dataset have yielded interesting results. Among the models tested, the Decision Tree Classifier, RandomForest Classifier, and KNN (K-Nearest Neighbors) showed promising performance.
Both the Decision Tree Classifier and RandomForest Classifier exhibited exceptional accuracy, achieving approximately 99%. This indicates that these models were able to accurately classify activities based on the provided dataset. The high accuracy suggests that these models are effective in capturing the underlying patterns and features that distinguish different activities.
On the other hand, the Adaboost Classifier did not perform well in our experiments, achieving only 46% accuracy. This suggests that the Adaboost model struggled to accurately classify activities based on the dataset. Further investigation may be required to understand the reasons behind its poor performance and identify potential improvements or alternative models.
Although this study provides valuable insights into activity classification on the PAMAP2 dataset, there are several avenues for future research that can further enhance the accuracy and applicability of activity recognition systems. Some potential areas for future work include:
1. Enhanced Feature Engineering: Exploring more advanced feature engineering techniques to capture the subtle nuances of different activities. This could involve extracting higher-level features or using advanced signal processing algorithms to extract more informative features from the sensor data.
2. AdaBoost poor performance: the Adaboost Classifier did not perform well in our experiments, achieving only 46% accuracy. This suggests that the Adaboost model struggled to accurately classify activities based on the given dataset.Can find reason for poor performance.
3. Deep Learning Approaches: Investigating the application of deep learning models, such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs), for activity classification on the PAMAP2 dataset. Deep learning models have shown promising results in various domains and could potentially improve the classification accuracy in this context.
In conclusion, this report presents a comparative analysis of different models for activity classification on the PAMAP2 dataset. The study highlights the performance of various classification algorithms and provides insights into their strengths and weaknesses. Through experimentation, we have identified the most accurate models and evaluated their effectiveness in differentiating between activities.
Overall, this report serves as a comprehensive analysis of activity classification on the PAMAP2 dataset, offering valuable insights and recommendations for future research. It is hoped that the findings presented here will contribute to the development of innovative solutions in areas such as healthcare monitoring, sports performance analysis, and human-computer interaction, ultimately improving the quality of life for individuals through accurate activity recognition.