Giter VIP home page Giter VIP logo

activity-recognizer's Introduction

Activity Classification from Accelerometer Data

Project Description

Dataset

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:

  1. Working at Computer
  2. Standing Up, Walking and Going Up/Down Stairs
  3. Standing
  4. Walking
  5. Going Up/Down Stairs
  6. Walking and Talking with Someone
  7. 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.

Goal

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.

Contents

feature_extraction.py

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)

classification.py

Creates two classifiers

  • k_means
  • decision_tree

evaluation.py

Uses two metrics

  • accuracy_score
  • fowlkes_mallows

visualize.py

Create all visuals including acceleration graphs and decision tree representations.

utils.py

Helper functions

main.py

Run the program

Getting Started

Dependencies

  • numpy
  • pandas
  • matplotlib
  • sklearn
  • graphviz

Run the Code

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

activity-recognizer's People

Contributors

fyzyx avatar

Stargazers

Jake Drew avatar  avatar

Watchers

 avatar

Forkers

ghayth82

activity-recognizer's Issues

Window Size or length

Hi,

what is the window size or length you used? as I could not see and windowing function in your code~?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.