Setting up the defaults:

knitr::opts_chunk$set(echo = TRUE, results = "asis")

Instructions

The purpose of this project is to demonstrate your ability to collect, work with, and clean a data set. Review criteria

  1. The submitted data set is tidy.
  2. The Github repo contains the required scripts.
  3. GitHub contains a code book that modifies and updates the available codebooks with the data to indicate all the variables and summaries calculated, along with units, and any other relevant information.
  4. The README that explains the analysis files is clear and understandable.
  5. The work submitted for this project is the work of the student who submitted it.

Getting and Cleaning Data Course Project

The purpose of this project is to demonstrate your ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis. You will be graded by your peers on a series of yes/no questions related to the project. You will be required to submit: 1) a tidy data set as described below, 2) a link to a Github repository with your script for performing the analysis, and 3) a code book that describes the variables, the data, and any transformations or work that you performed to clean up the data called CodeBook.md. You should also include a README.md in the repo with your scripts. This repo explains how all of the scripts work and how they are connected.

One of the most exciting areas in all of data science right now is wearable computing - see for example this article . Companies like Fitbit, Nike, and Jawbone Up are racing to develop the most advanced algorithms to attract new users. The data linked to from the course website represent data collected from the accelerometers from the Samsung Galaxy S smartphone. A full description is available at the site where the data was obtained:

http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

Here are the data for the project

You should create one R script called run_analysis.R that does the following.

  1. Merges the training and the test sets to create one data set.
  2. Extracts only the measurements on the mean and standard deviation for each measurement.
  3. Uses descriptive activity names to name the activities in the data set
  4. Appropriately labels the data set with descriptive variable names.
  5. From the data set in step 4, creates a second, independent tidy data set with the average of each variable for each activity and each subject.

Good luck!

Answer

run_analysis <- function(){
  mergeSubject <- function(dataSet, subject){
    cbind(dataSet, subject)
  }
  
  mergeActivity <- function(dataSet, activity){
    cbind(dataSet, activity)
  }
  
  mergeTrainTestSet <- function(train, test){
    rbind(train, test)
  }
  
  getMeanStdCol <- function(dataSet){
    dataSet[grep("mean\\b|std\\b",features$V2),1:2]
  }
  
  ## Phase 1
  ## Phase 1.1
  trainingSet <- read.table("./train/X_train.txt")
  subject <- read.table("./train/subject_train.txt")
  activity <-  read.table("./train/y_train.txt")
  mergedTrainingSet <- mergeActivity(mergeSubject(trainingSet, subject), activity)
  
  ## Phase 1.2
  testingSet <- read.table("./test/X_test.txt")
  subject <- read.table("./test/subject_test.txt")
  activity <-  read.table("./test/y_test.txt")
  mergedTestingSet <- mergeActivity(mergeSubject(testingSet, subject), activity)
  
  ## Phase 1.3
  mergedDataSet <- mergeTrainTestSet(mergedTrainingSet, mergedTestingSet)
  
  ## Phase 2
  ## Phase 2.1
  features <- read.table("features.txt")
  meanStdIndex <- getMeanStdCol(features)
  
  ## Phase 2.2
  includedCol <- c(meanStdIndex[,1], ncol(mergedDataSet)-1, ncol(mergedDataSet))
  
  ## Phase 2.3
  filteredDataSet <- mergedDataSet[,includedCol]
  
  ## Phase 3
  filteredDataSet <- setNames(filteredDataSet,c(as.character(meanStdIndex[,2]), "subject", "activity_names"))
  
  ## Phase 4
  ## Phase 4.1
  activityLabels <-read.table("activity_labels.txt")
  activityLabels[,2] <- as.character(activityLabels[,2])
  
  ## Phase 4.2
  tidyDataSet <- filteredDataSet
  tidyDataSet$activity_names <- activityLabels[match(tidyDataSet$activity_names,activityLabels[,1]),2]

  ## Phase 5
  endCol <- ncol(tidyDataSet)-2
  newTidySet <- aggregate(as.matrix(tidyDataSet[,1:endCol])~ subject + activity_names, tidyDataSet, mean)
  newTidySet
}

#Test the Function
head(run_analysis())

subject activity_names tBodyAcc-mean()-X tBodyAcc-mean()-Y 1 1 LAYING 0.2215982 -0.04051395 2 2 LAYING 0.2813734 -0.01815874 3 3 LAYING 0.2755169 -0.01895568 4 4 LAYING 0.2635592 -0.01500318 5 5 LAYING 0.2783343 -0.01830421 6 6 LAYING 0.2486565 -0.01025292 tBodyAcc-mean()-Z tBodyAcc-std()-X tBodyAcc-std()-Y tBodyAcc-std()-Z 1 -0.1132036 -0.9280565 -0.8368274 -0.8260614 2 -0.1072456 -0.9740595 -0.9802774 -0.9842333 3 -0.1013005 -0.9827766 -0.9620575 -0.9636910 4 -0.1106882 -0.9541937 -0.9417140 -0.9626673 5 -0.1079376 -0.9659345 -0.9692956 -0.9685625 6 -0.1331196 -0.9340494 -0.9246448 -0.9252161 tGravityAcc-mean()-X tGravityAcc-mean()-Y tGravityAcc-mean()-Z 1 -0.2488818 0.7055498 0.4458177 2 -0.5097542 0.7525366 0.6468349 3 -0.2417585 0.8370321 0.4887032 4 -0.4206647 0.9151651 0.3415313 5 -0.4834706 0.9548903 0.2636447 6 -0.4767099 0.9565938 0.1758677 tGravityAcc-std()-X tGravityAcc-std()-Y tGravityAcc-std()-Z 1 -0.8968300 -0.9077200 -0.8523663 2 -0.9590144 -0.9882119 -0.9842304 3 -0.9825122 -0.9812027 -0.9648075 4 -0.9212000 -0.9698166 -0.9761766 5 -0.9456953 -0.9859641 -0.9770766 6 -0.8877463 -0.9591620 -0.9281307 tBodyAccJerk-mean()-X tBodyAccJerk-mean()-Y tBodyAccJerk-mean()-Z 1 0.08108653 0.003838204 0.010834236 2 0.08259725 0.012254788 -0.001802649 3 0.07698111 0.013804101 -0.004356259 4 0.09344942 0.006933132 -0.006410543 5 0.08481648 0.007474608 -0.003040672 6 0.09634820 -0.001145292 0.003288173 tBodyAccJerk-std()-X tBodyAccJerk-std()-Y tBodyAccJerk-std()-Z 1 -0.9584821 -0.9241493 -0.9548551 2 -0.9858722 -0.9831725 -0.9884420 3 -0.9808793 -0.9687107 -0.9820932 4 -0.9783028 -0.9422095 -0.9785120 5 -0.9833079 -0.9645604 -0.9854194 6 -0.9663411 -0.9336745 -0.9596461 tBodyGyro-mean()-X tBodyGyro-mean()-Y tBodyGyro-mean()-Z 1 -0.016553094 -0.06448612 0.1486894 2 -0.018476607 -0.11180082 0.1448828 3 -0.020817054 -0.07185072 0.1379996 4 -0.009231563 -0.09301282 0.1697204 5 -0.021893501 -0.07987096 0.1598944 6 -0.007960503 -0.10721832 0.1791021 tBodyGyro-std()-X tBodyGyro-std()-Y tBodyGyro-std()-Z 1 -0.8735439 -0.9510904 -0.9082847 2 -0.9882752 -0.9822916 -0.9603066 3 -0.9745458 -0.9772727 -0.9635056 4 -0.9731024 -0.9611093 -0.9620738 5 -0.9794987 -0.9774274 -0.9605838 6 -0.9553782 -0.9436349 -0.9391419 tBodyGyroJerk-mean()-X tBodyGyroJerk-mean()-Y tBodyGyroJerk-mean()-Z 1 -0.1072709 -0.04151729 -0.07405012 2 -0.1019741 -0.03585902 -0.07017830 3 -0.1000445 -0.03897718 -0.06873387 4 -0.1050199 -0.03812304 -0.07121563 5 -0.1021141 -0.04044469 -0.07083097 6 -0.1112673 -0.04241043 -0.07177747 tBodyGyroJerk-std()-X tBodyGyroJerk-std()-Y tBodyGyroJerk-std()-Z 1 -0.9186085 -0.9679072 -0.9577902 2 -0.9932358 -0.9895675 -0.9880358 3 -0.9803286 -0.9867627 -0.9833383 4 -0.9751032 -0.9868556 -0.9839654 5 -0.9834223 -0.9837595 -0.9896796 6 -0.9396116 -0.9586288 -0.9595791 tBodyAccMag-mean() tBodyAccMag-std() tGravityAccMag-mean() 1 -0.8419292 -0.7951449 -0.8419292 2 -0.9774355 -0.9728739 -0.9774355 3 -0.9727913 -0.9642182 -0.9727913 4 -0.9545576 -0.9312922 -0.9545576 5 -0.9667779 -0.9586128 -0.9667779 6 -0.9188789 -0.8973262 -0.9188789 tGravityAccMag-std() tBodyAccJerkMag-mean() tBodyAccJerkMag-std() 1 -0.7951449 -0.9543963 -0.9282456 2 -0.9728739 -0.9877417 -0.9855181 3 -0.9642182 -0.9794846 -0.9761213 4 -0.9312922 -0.9700958 -0.9607864 5 -0.9586128 -0.9801413 -0.9774771 6 -0.8973262 -0.9547505 -0.9503419 tBodyGyroMag-mean() tBodyGyroMag-std() tBodyGyroJerkMag-mean() 1 -0.8747595 -0.8190102 -0.9634610 2 -0.9500116 -0.9611641 -0.9917671 3 -0.9515648 -0.9542751 -0.9867136 4 -0.9302365 -0.9470318 -0.9850685 5 -0.9469383 -0.9582879 -0.9864194 6 -0.9089802 -0.9209145 -0.9556457 tBodyGyroJerkMag-std() fBodyAcc-mean()-X fBodyAcc-mean()-Y 1 -0.9358410 -0.9390991 -0.8670652 2 -0.9897181 -0.9767251 -0.9798009 3 -0.9831393 -0.9806656 -0.9611700 4 -0.9826982 -0.9588021 -0.9388834 5 -0.9837714 -0.9687417 -0.9654195 6 -0.9531570 -0.9391143 -0.9237068 fBodyAcc-mean()-Z fBodyAcc-std()-X fBodyAcc-std()-Y fBodyAcc-std()-Z 1 -0.8826669 -0.9244374 -0.8336256 -0.8128916 2 -0.9843810 -0.9732465 -0.9810251 -0.9847922 3 -0.9683321 -0.9836911 -0.9640946 -0.9632791 4 -0.9675043 -0.9524649 -0.9463810 -0.9621545 5 -0.9770077 -0.9649539 -0.9729092 -0.9658822 6 -0.9380449 -0.9324629 -0.9297112 -0.9240047 fBodyAccJerk-mean()-X fBodyAccJerk-mean()-Y fBodyAccJerk-mean()-Z 1 -0.9570739 -0.9224626 -0.9480609 2 -0.9858136 -0.9827683 -0.9861971 3 -0.9805132 -0.9687521 -0.9791223 4 -0.9785425 -0.9439700 -0.9753833 5 -0.9826897 -0.9653286 -0.9832503 6 -0.9670724 -0.9360434 -0.9544258 fBodyAccJerk-std()-X fBodyAccJerk-std()-Y fBodyAccJerk-std()-Z 1 -0.9641607 -0.9322179 -0.9605870 2 -0.9872503 -0.9849874 -0.9893454 3 -0.9831226 -0.9710440 -0.9837119 4 -0.9800793 -0.9443669 -0.9802612 5 -0.9856253 -0.9662426 -0.9861356 6 -0.9686192 -0.9357175 -0.9635675 fBodyGyro-mean()-X fBodyGyro-mean()-Y fBodyGyro-mean()-Z 1 -0.8502492 -0.9521915 -0.9093027 2 -0.9864311 -0.9833216 -0.9626719 3 -0.9701673 -0.9780997 -0.9623420 4 -0.9672037 -0.9721878 -0.9614793 5 -0.9757975 -0.9782496 -0.9632029 6 -0.9354398 -0.9417715 -0.9326366 fBodyGyro-std()-X fBodyGyro-std()-Y fBodyGyro-std()-Z fBodyAccMag-mean() 1 -0.8822965 -0.9512320 -0.9165825 -0.8617676 2 -0.9888607 -0.9819106 -0.9631742 -0.9751102 3 -0.9759864 -0.9770325 -0.9672569 -0.9655243 4 -0.9750947 -0.9561825 -0.9658075 -0.9393897 5 -0.9807058 -0.9772578 -0.9633057 -0.9622350 6 -0.9621650 -0.9453651 -0.9471368 -0.9123517 fBodyAccMag-std() fBodyBodyAccJerkMag-mean() fBodyBodyAccJerkMag-std() 1 -0.7983009 -0.9333004 -0.9218040 2 -0.9751214 -0.9853741 -0.9845685 3 -0.9683502 -0.9759496 -0.9753054 4 -0.9371880 -0.9622871 -0.9580371 5 -0.9625254 -0.9773564 -0.9763819 6 -0.9053740 -0.9486555 -0.9515527 fBodyBodyGyroMag-mean() fBodyBodyGyroMag-std() 1 -0.8621902 -0.8243194 2 -0.9721130 -0.9610984 3 -0.9645867 -0.9554419 4 -0.9615567 -0.9471003 5 -0.9682571 -0.9592631 6 -0.9301536 -0.9286949 fBodyBodyGyroJerkMag-mean() fBodyBodyGyroJerkMag-std() 1 -0.9423669 -0.9326607 2 -0.9902487 -0.9894927 3 -0.9842783 -0.9825682 4 -0.9836091 -0.9825436 5 -0.9846180 -0.9834345 6 -0.9536960 -0.9555047

README file

The run_analysis.R script is composed of five (5) major phases with the following functionality:

Phase 1 is designed to merge the training and the test sets to create one data set. It has three (3) sub-phases with the following functionality:

Phase 2 is designed to extract only the measurements on the mean and standard deviation for each measurement in mergedDataSet. . It has three (3) sub-phases with the following functionality:

Phase 4 is designed to assign a descriptive activity name for every activity in the filteredDataSet through the following phases:

Phase 5 is designed to create a second, independent tidy data set with the average of each variable for each activity and each subject using the dataset that was produced in Phase 4.

Code Book

Human Activity Recognition Using Smartphones Analyzed Dataset

Data Dictionary

INFORMATION ABOUT THE DATASET:
The tidy dataset described in this Code Book was created using the following files:
+ ‘features_info.txt’: Shows information about the variables used on the feature vector.
+ ‘activity_labels.txt’: Links the class labels with their activity name.
+ ‘train/X_train.txt’: Training set.
+ ‘train/y_train.txt’: Training labels.
+ ‘test/X_test.txt’: Test set.
+ ‘test/y_test.txt’: Test labels.

The following files are available for the train and test data. Their descriptions are equivalent.
+ ‘train/subject_train.txt’: Each row identifies the subject who performed the activity for each window sample. Its range is from 1 to 30.

Note: Each feature vector is a row on the text file.

| subject | 2 |
| — | — | Subject Label + 1..30 .Unique Identifier assigned for each subject who performed the activity for each window sample.

| activity_names | 18
| — | — | Activity Label
+ Six activities performed by each subject wearing a smartphone. Converted from its original value (1, 2, 3, 4, 5, 6) to:
WALKING
WALKING_UPSTAIRS
WALKING_DOWNSTAIRS
SITTING
STANDING
LAYING

Respectively.

NOTES FOR THE FEATURES ONWARD:

The features selected for this database come from the accelerometer and gyroscope 3-axial raw signals tAcc-XYZ and tGyro-XYZ. These time domain signals (prefix ‘t’ to denote time) were captured at a constant rate of 50 Hz. Then they were filtered using a median filter and a 3rd order low pass Butterworth filter with a corner frequency of 20 Hz to remove noise. Similarly, the acceleration signal was then separated into body and gravity acceleration signals (tBodyAcc-XYZ and tGravityAcc-XYZ) using another low pass Butterworth filter with a corner frequency of 0.3 Hz.

Subsequently, the body linear acceleration and angular velocity were derived in time to obtain Jerk signals (tBodyAccJerk-XYZ and tBodyGyroJerk-XYZ). Also the magnitude of these three-dimensional signals were calculated using the Euclidean norm (tBodyAccMag, tGravityAccMag, tBodyAccJerkMag, tBodyGyroMag, tBodyGyroJerkMag).

Finally a Fast Fourier Transform (FFT) was applied to some of these signals producing fBodyAcc-XYZ, fBodyAccJerk-XYZ, fBodyGyro-XYZ, fBodyAccJerkMag, fBodyGyroMag, fBodyGyroJerkMag. (Note the ‘f’ to indicate frequency domain signals).

These signals were used to estimate variables of the feature vector for each pattern
‘-XYZ’ is used to denote 3-axial signals 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 mean (mean()) and standard deviation (std()) of the above signals were then estimated and selected. Finally, the average of each signal for each activity and each subject were calculated for the following set of variables:

| tBodyAcc-mean()-X | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAcc-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAcc-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAcc-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAcc-std()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAcc-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAcc-mean()-X | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAcc-mean()-Y | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAcc-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAcc-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAcc-std()-Y | 11 |
| — | — | + 1..1 .Normalized and bounded value of the feature.

tGravityAcc-std()-Z** | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-std()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerk-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-std()-Y | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyro-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-std()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerk-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAccMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tGravityAccMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerkMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyAccJerkMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerkMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| tBodyGyroJerkMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-mean()-Z | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-std()-Y | 11 |
| — | — | -1..1 .Normalized and bounded value of the feature.

| fBodyAcc-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-std()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccJerk-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-mean()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-mean()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-mean()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-std()-X | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-std()-Y | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyGyro-std()-Z | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyAccMag-std() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyAccJerkMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyAccJerkMag-std() | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyGyroMag-mean() | 11 |
| — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyGyroMag-std() | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyGyroJerkMag-mean() | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

| fBodyBodyGyroJerkMag-std() | 11 | | — | — | + -1..1 .Normalized and bounded value of the feature.

NOTE:

This Code book is an updated/modified version of the Code book provided in:

Human Activity Recognition Using Smartphones Dataset
Version 1.0

Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto Smartlab - Non Linear Complex Systems Laboratory DITEN - Università degli Studi di Genova. Via Opera Pia 11**A, I-16145, Genoa, Italy. activityrecognition@smartlab.ws www.smartlab.ws