Skip to content

etsuprun/UCIHARDataSet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

What this does

This script, run_analysis.R, transforms the raw HAR dataset (Human Activity Recognition Using Smartphones Dataset) into a tidy set. This repo also includes the resulting tidy dataset (output.txt) and the codebook (codebook.MD).

The script was written by Eugene Tsuprun for a course project (Getting and Cleaning Data, https://www.coursera.org/course/getdata, June 2015).

About the raw data set

The full description of the raw data set is available here: http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

The raw set contains 561 measurements of velocity and acceleration, recorded with a smartphone gyroscope and accelerometer, from 30 subjects each performing 6 different activities (ALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING).

The tidy set

The tidy set contains just the means and standard deviations of each measurement, by subject and by activity. See codebook.MD for details.

The script

The script, run_analysis.R, transforms the raw set into the tidy set by:

  1. Combining the training and test datasets
  2. Linking the measurements to subject IDs
  3. Labeling each activity and feature
  4. Computing means and SDs for each activity, by subject and activity
  5. Removing all measurements other than means and SDs
  6. Reshaping the data so that each feature/activity/subject/measure (mean or SD) combination is in its own row

To use the script, download the raw dataset here: http://archive.ics.uci.edu/ml/machine-learning-databases/00240/

Place the script into the main folder for the dataset, and set the working directory to the dataset folder. Then, simply run the script to generate "output.txt"--the tidy dataset.

Contents

  • codebook.MD: describes the fields in the tidy dataset
  • output.txt: the tidy dataset
  • run_analysis.R: contains the R script that tidies the raw data set

Dataset source

[1] Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages