This package takes the Human Activity Recognition Using Smartphones Dataset[1] and calculated the average of the Mean and StdDev variables, outputtng to a CleanedSummary.txt file.
It is expected that either the UCI HAR Dataset or the test and train folders are available in the working directory. Execution of the script is performed by running run_analysis()
.
The following steps are performed to clean up the variable names. We chose to use CamelCasing to ensure readability of the lengthy variables:
- Leading f/t characters are changed to FrequencyDomain/TimeDomain
- Dashes and Parenthesis are removed.
- Gravity and function names [mean/std] are capitalised.
- Frequency bands (in the form of -N1,N2) are simplified to the positive term (N2)
- Example:
fBodyAcc-BandsEnergy()-17,24
would becomeFrequencyDomainBodyAccBandsEnergy24
- Example:
#Data Dictionary
- subjectid
- activity
- TimeDomainBodyAccMeanX
- TimeDomainBodyAccMeanY
- TimeDomainBodyAccMeanZ
- TimeDomainBodyAccStdX
- TimeDomainBodyAccStdY
- TimeDomainBodyAccStdZ
- TimeDomainGravityAccMeanX
- TimeDomainGravityAccMeanY
- TimeDomainGravityAccMeanZ
- TimeDomainGravityAccStdX
- TimeDomainGravityAccStdY
- TimeDomainGravityAccStdZ
- TimeDomainBodyAccJerkMeanX
- TimeDomainBodyAccJerkMeanY
- TimeDomainBodyAccJerkMeanZ
- TimeDomainBodyAccJerkStdX
- TimeDomainBodyAccJerkStdY
- TimeDomainBodyAccJerkStdZ
- TimeDomainBodyGyroMeanX
- TimeDomainBodyGyroMeanY
- TimeDomainBodyGyroMeanZ
- TimeDomainBodyGyroStdX
- TimeDomainBodyGyroStdY
- TimeDomainBodyGyroStdZ
- TimeDomainBodyGyroJerkMeanX
- TimeDomainBodyGyroJerkMeanY
- TimeDomainBodyGyroJerkMeanZ
- TimeDomainBodyGyroJerkStdX
- TimeDomainBodyGyroJerkStdY
- TimeDomainBodyGyroJerkStdZ
- TimeDomainBodyAccMagMean
- TimeDomainBodyAccMagStd
- TimeDomainGravityAccMagMean
- TimeDomainGravityAccMagStd
- TimeDomainBodyAccJerkMagMean
- TimeDomainBodyAccJerkMagStd
- TimeDomainBodyGyroMagMean
- TimeDomainBodyGyroMagStd
- TimeDomainBodyGyroJerkMagMean
- TimeDomainBodyGyroJerkMagStd
- FreqDomainBodyAccMeanX
- FreqDomainBodyAccMeanY
- FreqDomainBodyAccMeanZ
- FreqDomainBodyAccStdX
- FreqDomainBodyAccStdY
- FreqDomainBodyAccStdZ
- FreqDomainBodyAccMeanFreqX
- FreqDomainBodyAccMeanFreqY
- FreqDomainBodyAccMeanFreqZ
- FreqDomainBodyAccJerkMeanX
- FreqDomainBodyAccJerkMeanY
- FreqDomainBodyAccJerkMeanZ
- FreqDomainBodyAccJerkStdX
- FreqDomainBodyAccJerkStdY
- FreqDomainBodyAccJerkStdZ
- FreqDomainBodyAccJerkMeanFreqX
- FreqDomainBodyAccJerkMeanFreqY
- FreqDomainBodyAccJerkMeanFreqZ
- FreqDomainBodyGyroMeanX
- FreqDomainBodyGyroMeanY
- FreqDomainBodyGyroMeanZ
- FreqDomainBodyGyroStdX
- FreqDomainBodyGyroStdY
- FreqDomainBodyGyroStdZ
- FreqDomainBodyGyroMeanFreqX
- FreqDomainBodyGyroMeanFreqY
- FreqDomainBodyGyroMeanFreqZ
- FreqDomainBodyAccMagMean
- FreqDomainBodyAccMagStd
- FreqDomainBodyAccMagMeanFreq
- FreqDomainBodyBodyAccJerkMagMean
- FreqDomainBodyBodyAccJerkMagStd
- FreqDomainBodyBodyAccJerkMagMeanFreq
- FreqDomainBodyBodyGyroMagMean
- FreqDomainBodyBodyGyroMagStd
- FreqDomainBodyBodyGyroMagMeanFreq
- FreqDomainBodyBodyGyroJerkMagMean
- FreqDomainBodyBodyGyroJerkMagStd
- FreqDomainBodyBodyGyroJerkMagMeanFreq
- TimeDomainBodyAccMeanGravityAngle
- TimeDomainBodyAccJerkMeanGravityMeanAngle
- TimeDomainBodyGyroMeanGravityMeanAngle
- TimeDomainBodyGyroJerkMeanGravityMeanAngle
- XGravityMeanAngle
- YGravityMeanAngle
- ZGravityMeanAngle
[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
This dataset is distributed AS-IS and no responsibility implied or explicit can be addressed to the authors or their institutions for its use or misuse. Any commercial use is prohibited.
Jorge L. Reyes-Ortiz, Alessandro Ghio, Luca Oneto, Davide Anguita. November 2012.