These signals were used to estimate variables of the feature vector for each pattern in the X, Y and Z directions.
tBodyAcc-XYZ
tGravityAcc-XYZ
tBodyAccJerk-XYZ
tBodyGyro-XYZ
tBodyGyroJerk-XYZ
tBodyAccMag
tGravityAccMag
tBodyAccJerkMag
tBodyGyroMag
tBodyGyroJerkMag
fBodyAcc-XYZ
fBodyAccJerk-XYZ
fBodyGyro-XYZ
fBodyAccMag
fBodyAccJerkMag
fBodyGyroMag
fBodyGyroJerkMag
The set of variables that were estimated from these signals are:
mean()
: Mean valuestd()
: Standard deviationmad()
: Median absolute deviationmax()
: Largest value in arraymin()
: Smallest value in arraysma()
: Signal magnitude areaenergy()
: Energy measure. Sum of the squares divided by the number of values.iqr()
: Interquartile rangeentropy()
: Signal entropyarCoeff()
: Autorregresion coefficients with Burg order equal to 4correlation()
: correlation coefficient between two signalsmaxInds()
: index of the frequency component with largest magnitudemeanFreq()
: Weighted average of the frequency components to obtain a mean frequencyskewness()
: skewness of the frequency domain signalkurtosis()
: kurtosis of the frequency domain signalbandsEnergy()
: Energy of a frequency interval within the 64 bins of the FFT of each window.angle()
: Angle between to vectors.
Additional vectors obtained by averaging the signals in a signal window sample. These are used on the angle() variable:
gravityMean
tBodyAccMean
tBodyAccJerkMean
tBodyGyroMean
tBodyGyroJerkMean
These measurements are performed multiple times on each subject, and during several activities as stated here:
WALKING
: subject walkingWALKING_UPSTAIRS
: subject walking up a set of stairsWALKING_DOWNSTAIRS
: subject walking down a set of stairsSITTING
: subject sittingSTANDING
: subject standingLAYING
: subject laying down
Includes only the mean
and std
variables. the original data contains repeated measurements for each subject
and each activity
.
In the tidy dataset, the average of measurements per subject
, per activity
are calculated and reported.
- training and test data sets are read into tables, and appropriate column names are assigned for
subject
andactivity
- the tables are merged using
rbind
command - feature labels are read into a table, and columns with words
mean
orstd
are selected using thegrep
command - a smaller subset of data from selected columns is created
- activity labels are read into a table, and are substituded for the activity numbers using
mapvalues
command - variable names are inserted in the smaller data set
- the
melt
anddcast
commands are used to re-shape the data and populate average values for each variable. - the final tidy data set is written into a text file.