The task of the course programming assignment is an analysis of sensors (accelerometer and gyroscope) data generated from experiments with Samsung Galaxy S II smartphones. The experiment details can be found in references 1, 2 and 3.
Within this course programming assignment there was an R script 'run_analysis.R' created that does the following:
- Part I: Merges the training and the test sets to create one data set.
- Part II: Extracts only the measurements on the mean and standard deviation for each measurement.
- Part III: Uses descriptive activity names to name the activities in the data set.
- Part IV: Appropriately labels the data set with descriptive variable names.
- Part V: From the data set in step IV, creates a second, independent tidy data set with the average of each variable for each activity and each subject.
The last data set is saved to the 'run_analysis_output.txt' file.
- 'README.md' - this file with course programming assignment description.
- 'run_analysis.R' - R script that does data manipulating.
- 'CodeBook.md' - Describes the experiment data variables and the steps taken to obtain final result.
- 'run_analysis_output.txt' - Output file generated by the run_analysis.R script.
The path to the data from smartphone sensors (folder 'UCI HAR Dataset') must be defined in the variable 'data_Location' in the script 'run_analysis.R'. The current version of the script must be placed at the same location as 'UCI HAR Dataset' folder
The folder 'UCI HAR Dataset' structure is meant to be following:
|-- activity_labels.txt
|-- features_info.txt
|-- features.txt
|-- README.txt
|-- test
| |-- Inertial Signals
| | |-- body_acc_x_test.txt
| | |-- body_acc_y_test.txt
| | |-- body_acc_z_test.txt
| | |-- body_gyro_x_test.txt
| | |-- body_gyro_y_test.txt
| | |-- body_gyro_z_test.txt
| | |-- total_acc_x_test.txt
| | |-- total_acc_y_test.txt
| | |-- total_acc_z_test.txt
| |-- subject_test.txt
| |-- X_test.txt
| |-- y_test.txt
|-- train
|-- Inertial Signals
| |-- body_acc_x_train.txt
| |-- body_acc_y_train.txt
| |-- body_acc_z_train.txt
| |-- body_gyro_x_train.txt
| |-- body_gyro_y_train.txt
| |-- body_gyro_z_train.txt
| |-- total_acc_x_train.txt
| |-- total_acc_y_train.txt
| |-- total_acc_z_train.txt
|-- subject_train.txt
|-- X_train.txt
|-- y_train.txt
- [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
- [2] http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones
- [3] README.txt of the dataset: http://archive.ics.uci.edu/ml/machine-learning-databases/00240/UCI%20HAR%20Dataset.zip