# Human Activity Recognition with Smartphone Sensors & ML
> Learn how to balance accuracy and efficiency in Human Activity Recognition (HAR) using SVM, KNN, and PCA for smartphone signal processing.

Tags: machine-learning, signal-processing, smartphone-sensors, pca, support-vector-machine, human-activity-recognition, data-science
## Human Activity Recognition Using Smartphones
* Signal Processing & Machine Learning Project using the UCI HAR dataset.

## Motivation & Goals
* Applications: Healthcare, elderly monitoring, and fitness tracking.
* Goal: Build a robust system balancing classification accuracy vs. computational cost.

## UCI HAR Dataset Overview
* Data from 30 volunteers (ages 19-48) with 50 Hz sampling.
* Activities: Walking, Walking Up, Walking Down, Sitting, Standing, Laying.

## Signal Preprocessing Pipeline
* Sensors: 3-axial Accelerometer & Gyroscope.
* Windowing: 2.56 sec segments (128 samples) with 50% overlap.
* Filters: Median filter for noise, Butterworth low-pass (20Hz), and gravity separation (0.3Hz).

## Feature Extraction
* 561 features extracted per window.
* Time Domain: Mean, STD, Energy.
* Frequency Domain: FFT, Spectral Energy.

## Evaluation of Models & PCA
* Models: Linear SVM, K-Nearest Neighbors (KNN), and Decision Trees.
* PCA Results: 100 components capture 95% variance; 3 components capture 75%.
* Performance: Linear SVM achieved the best results with 88.4% accuracy.
* Efficiency: Using PCA with 100 features resulted in a 57% speed boost with minimal accuracy loss.

## Confusion Matrix & Analysis
* High performance on 'Laying' (~100% accuracy).
* Minor confusion between similar postures (Sitting vs. Standing) and dynamic patterns (Walking vs. Walking Upstairs).

## Conclusions & Future Work
* Linear SVM is the optimal classical model (88.4% accuracy).
* PCA is highly viable for real-time mobile systems.
* Future Work: Transitioning to Deep Learning (CNN/LSTM) and real-time mobile deployment.
---
This presentation was created with [Bobr AI](https://bobr.ai) — an AI presentation generator.