This project focuses on applying signal processing techniques to classify human activities based on raw sensor signals from smartphone accelerometers and gyroscopes. The dataset used in this project is sourced from the UCL Machine Learning Repository, comprising measurements from 30 individuals aged 19 to 48. The measurements were collected using smartphones placed on the waist, capturing six different activities:
- Walking
- Walking Upstairs
- Walking Downstairs
- Sitting
- Standing
- Laying
The dataset has undergone preprocessing steps, including noise filtering and segmentation into fixed-width windows of 2.56 seconds with 50% overlap. Each signal window contains 128 samples, sampling frequency of 50 Hz, contributing to the comprehensive nature of the dataset.
The smartphone measures the following components per measurement:
- Three-axial linear body acceleration
- Three-axial linear gravitational acceleration
- Three-axial angular velocity
For each measurement, there are a total of nine components contributing to the signal.
The dataset can be accessed on the UCL Machine Learning Repository: Human Activity Recognition using Smartphones
In this project, Digital Signal Processing (DSP) techniques were employed to extract meaningful features from the raw sensor signals. The application of DSP enhances the representation of the data, capturing relevant patterns and characteristics for improved model performance. The DSP techniques used are:
- Fast Fourier transformation (FFT)
- Power spectral density (PSD)
- Autocorrelation
A Random Forest model was developed from scratch to classify the human activities based on the extracted features. The model leverages the ensemble learning technique, combining multiple decision trees to enhance accuracy and robustness in activity classification.
This project was the wrap up project of the HarvardX course Using Python for Research, where i could apply all the skills and knowledge i have learned throughout the course to this project.