|
|
---
|
|
|
tags:
|
|
|
- deep-learning
|
|
|
- lstm
|
|
|
- human-activity-recognition
|
|
|
- sensor-data
|
|
|
license: mit
|
|
|
library_name: keras
|
|
|
---
|
|
|
|
|
|
# Human Activity Recognition with LSTM
|
|
|
|
|
|
## Overview
|
|
|
This project focuses on **Human Activity Recognition (HAR)** using **LSTM-based neural networks**. The goal is to classify different human activities based on motion sensor data.
|
|
|
|
|
|
### Dataset Used
|
|
|
The model is trained on the **UCI HAR Dataset**, a widely used benchmark dataset for human activity recognition. It contains data collected from accelerometers and gyroscopes of smartphones while subjects performed daily activities.
|
|
|
|
|
|
## Model Performance
|
|
|
### Classification Report
|
|
|
Below are the precision, recall, and F1-score for each activity class:
|
|
|
|
|
|
|
|
|
```plaintext
|
|
|
precision recall f1-score support
|
|
|
|
|
|
Class 0 0.92 0.98 0.95 496
|
|
|
Class 1 0.95 0.91 0.93 471
|
|
|
Class 2 0.98 0.95 0.96 420
|
|
|
Class 3 0.92 0.94 0.93 491
|
|
|
Class 4 0.94 0.93 0.94 532
|
|
|
Class 5 1.00 0.99 1.00 537
|
|
|
|
|
|
accuracy 0.95 2947
|
|
|
macro avg 0.95 0.95 0.95 2947
|
|
|
weighted avg 0.95 0.95 0.95 2947
|
|
|
|
|
|
```
|
|
|
|
|
|
### Confusion Matrix
|
|
|
The confusion matrix below visualizes the model's performance in classifying different activities:
|
|
|
|
|
|

|
|
|
|
|
|
## Next Steps
|
|
|
- Improve the model with **GRU & CNN architectures**.
|
|
|
- Expand testing with **real-world sensor data**.
|
|
|
- Fine-tune hyperparameters for better generalization.
|
|
|
|
|
|
|