This project performs classification of human activities (e.g., walking, sitting, standing) based on smartphone sensor data using machine learning models. The dataset consists of preprocessed accelerometer and gyroscope readings from 30 participants.
- Source: UCI HAR Dataset
- Samples: 10,299
- Features: 561 (time & frequency domain)
- Activities:
- WALKING
- WALKING_UPSTAIRS
- WALKING_DOWNSTAIRS
- SITTING
- STANDING
- LAYING
- Class and subject distribution
- Feature correlation, PCA visualization
- Label mapping
- Feature scaling (StandardScaler)
- SelectKBest feature selection
- PCA for dimensionality reduction (optional)
- Trained:
RandomForest
,SVM (RBF)
,KNN
,MLP
- Evaluated using accuracy and classification reports
RandomizedSearchCV
withStratifiedKFold
for:- RandomForest
- MLPClassifier
- SVM (RBF)
- Soft Voting
- Stacking (meta-model: LogisticRegression)
- Blending (weighted average)
- Confusion matrix
- Misclassified samples
- Most confused activity pairs
- Accuracy: ~95–97% (ensemble models)
- Inference-ready prediction function using saved model, scaler, and selector