In numerous healthcare applications, activity Recognition is a critical duty. It is feasible to provide automatic suggestions to both patients and physicians by continually monitoring and analyzing user behavior.
Our project aims to determine whether we can use fewer sensors to acquire useful information, what machine learning model might be deployed, and what should be done to improve our classifiers' performance.
- Sklearn (The sklearn library contains a lot of efficient tools for machine learning)
- Human Activity Recognition
- Description
- Requirements
- Table Of Contents
- Data
- Pre-Processing
- Guideline
- Results
- Report
- Future Work
- Contributing
The PAMAP2 Physical Activity Monitoring Dataset is an ML dataset from the UCI repository that contains data from 18 different physical activities conducted by 9 participants while wearing three inertial measurement units and a heart rate monitor.
- Only 4 activities were chosen to predict from.
- Because the ninth subject did not participate in any of the activities we picked, only eight participants' data were used instead of nine.
- Optional data were ignored.
-
You must first donwload PAMAP2 data.
-
Create a new directory.
Your_project_file\PAMAM2\protocol
-
Put the data subjects 0 through 8 into the directory.
-
To be efficient with such massive data, we will just read it once, alter it, and store it as new CSV files.
-
so another directory will be created
Your_project_file\data_CSV
-
You may now work with your processed data and test your models without having to read anything else.
warning: If any preprocessing happened, CSV files must be recreated.
-
Testing on just 4 Activities we achivied decent results even with Logistic regression model
-
We recommend using a Logistic model on a normalized data sample to effectively make a prediction
| Model | Train Accuracy | Test Accuracy |
|---|---|---|
| K-Nearest Neighboor | 99.99% | 98.67% |
| Random forest classifer | 94.56% | 94.45% |
| Descsion tree classifer | 95.04% | 94.24% |
| Support vector machine | 98.36% | 98.21% |
| Logistic Regresssion | 96.23% | 95.85% |
| Model | Train Accuracy | Test Accuracy |
|---|---|---|
| K-Nearest Neighboor | 99.82% | 99.83% |
| Random forest classifer | 89.75% | 89.83% |
| Descsion tree classifer | 84.77% | 84.79% |
| Support vector machine | 94.72% | 94.72% |
| Logistic Regresssion | 96.49% | 96.4% |
- See the Modeling&results notebook for detailed results
Project's PDF Report
We want to work on all other activities in order to get very high accuracy when modeling with logistic regression.
Any kind of enhancement or contribution is welcomed.
Suggestions are also welcomed.

