This project implements Human Activity Recognition (HAR) using the UCI HAR Dataset. It compares the performance of a Gaussian Naive Bayes classifier trained on:
- All available features
- Features reduced using K-Means clustering
The dataset is downloaded automatically from the UCI Machine Learning Repository.
Human Activity Recognition Using Smartphones Dataset
- Source: UCI Machine Learning Repository
- Python
- Pandas
- NumPy
- Scikit-learn
- BeautifulSoup
- Requests
- Download dataset automatically
- Load training data
- Encode activity labels
- Standardize features
- Train Gaussian Naive Bayes on all features
- Reduce features using K-Means clustering
- Train Gaussian Naive Bayes on reduced features
- Compare accuracy and training time
The notebook prints:
- Accuracy using all features
- Accuracy using reduced features
- Training time
- Number of selected features
pip install -r requirements.txtOpen the notebook and run all cells.
The dataset is downloaded automatically.