The dataset for this project can be found in the UCI Machine Learning Repository. The dataset consists of 15 participants, each of whom performed 7 different activities. The activities are as follows:
- Working at Computer
- Standing Up, Walking and Going Up/Down Stairs
- Standing
- Walking
- Going Up/Down Stairs
- Walking and Talking with Someone
- Talking while Standing
The data is provided a series of measuremeants of the x, y, and z components of acceleration.
The extracted feature data can be found in data/data.csv
. See the UCI link for raw files.
Ultimatley, we would like to use the accelerometer data to determine which activity someone is performing. We would like to extract useful patterns from the data that can be used as distinguishing features for a classification algorithm.
Reads in the initial time series data and converts it into feature vectors. Current features include
- mean (x, y, z)
- standard deviation (x, y, z)
- dominant frequency (x, y, z)
Creates two classifiers
k_means
decision_tree
Uses two metrics
accuracy_score
fowlkes_mallows
Create all visuals including acceleration graphs and decision tree representations.
Helper functions
Run the program
numpy
pandas
matplotlib
sklearn
graphviz
To see the results of this analysis, run the following from a command prompt:
python main.py
NOTE: It may take some time to complete since it is averaging the results of ten different models