-
Notifications
You must be signed in to change notification settings - Fork 0
/
Codebook
181 lines (137 loc) · 7.4 KB
/
Codebook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
Getting and Cleaning Data Final Project Codebook
Describes the variables, the data, and work performed to clean up the data.
=====================================================================================================================
-DATA-
=====================================================================================================================
Human Activity Recognition Using Smartphones Dataset
Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto.
Smartlab - Non Linear Complex Systems Laboratory
Experiments were carried out on a group of 30 volunteers between the ages 19-48 by. Each person performed 6 activities
while wearing a smartphone (Samsung Galaxy S II) on the waist. Using the phones embedded accelerometer and gyroscope,
3-axial linear acceleration and 3-axial angular and 3-axial angular velocity at a constant rate of 50Hz.
70% of the volunteers were selected for generating training data and 30% for test data.
-Test group data-
X_test.txt: Includes observations for each subject-activity on 561 time and frequency domain variables.
Y_test.txt: Each row identifies the activity performed using a class label.
subject_test.txt: Each row identifies the subject who performed the activity for each window sample. 1-30.
-Training group data-
X_train.txt:Includes observations for each subject-activity on 561 time and frequency domain variables.
Y_train.txt: Each row identifies the activity performed using a class label.
subject_train.txt: Each row identifies the subject who performed the activity for each window sample. 1-30.
-Supplementary-
features.txt: A 561 vector with time and frequency domain variable names.
activity_labels.txt: Links the class labels in the Y files with their activity name
======================================================================================================================
-Variables-
======================================================================================================================
SubjectID = identification number for each subject
Integer type, ranges from 1-30
Activity = activities completed by each subject as part of the experiment
Character type, activities include: Laying, Sitting, Standing, Walking, Walking_Downstairs, Walking_Upstairs
*Notes on the following variables: the value for each variable is the average for each Subject-Activity combination on that measurment.
Some of the variables include X,Y,Z referring to either the X, Y, or Z axis. All are numeric type.*
Average time of body accerlation at the X, Y, and Z axis
body_accelX_time_mean
body_accelY_time_mean
body_accelZ_time_mean
Standard deviation of the time of body accerlation at the X, Y, and Z axis
body_accelX_time_std
body_accelY_time_std
body_accelZ_time_std
Average time of graviational acceleration at the X, Y, and Z axis
gravity_accelX_time_mean
gravity_accelY_time_mean
gravity_accelZ_time_mean
Standarad deviation of the time of graviational acceleration at the X, Y, and Z axis
gravity_accelX_time_std
gravity_accelY_time_std
gravity_accelZ_time_std
Average time of body jerk acceleration at the X, Y, and Z axis
bodyjerk_accelX_time_mean
bodyjerk_accelY_time_mean
bodyjerk_accelZ_time_mean
Standard deviation of the time of body jerk acceleration at the X, Y, and Z axis
bodyjerk_accelX_time_std
bodyjerk_accelY_time_std
bodyjerk_accelZ_time_std
Average time of the angular velocity measured by the gyroscope at the X, Y, and Z axis
body_gyroX_time_mean
body_gyroY_time_mean
body_gyroZ_time_mean
Standard deviation of the time of the angular velocity measured by the gyroscope at the X, Y, and Z axis
body_gyroX_time_std
body_gyroY_time_std
body_gyroZ_time_std
Average time of body jerk measured by the gyroscope at the X, Y, and Z axis
bodyjerk_gyroX_time_mean
bodyjerkY_gyro_time_mean
bodyjerkZ_gyro__timemean
Standard deviation of the time of body jerk measured by the gyroscope at the X, Y, and Z axis
bodyjerkX_gyro_time_std
bodyjerk_gyroY_time_std
bodyjerk_gyroZ_time_std
Average time of the magnitude of body accerleration
body_accel_magnitude_time_mean
Standard deviation of the time of the magnitude of body accerleration
body_accel_magnitude_time_std
Average time of the magnitude of body jerk acceleration
bodyjerk_accel_magnitude__time_mean
Standard deviation of the time of the magnitude of body jerk acceleration
bodyjerk_accel_magnitude_time_std
Average time of the magnitude of the angular velocity measured by the gyroscope
body_gyro_magnitude_time_mean
Standard deviation of the time of the magnitude of the angular velocity measured by the gyroscope
body_gyro_magnitude_time_std
Average time of the magnitude of body jerk measured by the gyroscope
bodyjerk_gyro_magnitude_time_mean
Standard deviation of the time of the magnitude of body jerk measured by the gyroscope
bodyjerk_gyro_magnitude_time_std
Average frequency of body accerlation at the X, Y, and Z axis
body_accelX_freq_mean
body_accelY_freq_mean
body_accelZ_freq_mean
Standard deviation of the frequency of body accerlation at the X, Y, and Z axis
body_accelX_freq_std
body_accelY_freq_std
body_accelZ_freq_std
Average frequency of body jerk acceleration at the X, Y, and Z axis
bodyjerk_accelX_freq_mean
bodyjerk_accelY_freq_mean
bodyjerk_accelZ_freq_mean
Standard deviation of the frequency of body jerk acceleration at the X, Y, and Z axis
bodyjerk_accelX_freq_std
bodyjerk_accelY_freq_std
bodyjerk_accelZ_freq_std
Average frequency of the angular velocity measured by the gyroscope at the X, Y, and Z axis
body_gyroX_freq_mean
body_gyroY_freq_mean
body_gyroZ_freq_mean
Standard deviation of the frequency of the angular velocity measured by the gyroscope at the X, Y, and Z axis
body_gryoX_freq_std
body_gryoY_freq_std
body_gryoZ_freq_std
Average frequency of the magnitude of body accerleration
body_accel_magnitude_freq_mean
Standard deviation of the frequency of the magnitude of body accerleration
body_accel_magnitude_freq_std
Average frequency of the magnitude of body jerk acceleration
bodyjerk_accel_magnitude_freq_mean
Standard deviation of the frequency of the magnitude of body jerk acceleration
bodyjerk_accel_magnitude_freq_std
Average frequency of the magnitude of the angular velocity measured by the gyroscope
body_gryo_magnitude_freq_mean
Standard deviation of the frequency of the magnitude of the angular velocity measured by the gyroscope
body_gryo_magnitude_freq_std
Average frequency of body jerk measured by the gyroscope at the X, Y, and Z axis
bodyjerk_gyro_magnitude_freq_mean
Standard deviation of the frequency of the magnitude of body jerk measured by the gyroscope
bodyjerk_gyro_magnitude_freq_std
======================================================================================================================
-Cleaning up the data-
======================================================================================================================
After reading the data files in, they were merged together by first combining columns of the test and train datasets
separately and then combining the rows of the two groups.
A new data frame was created that only included the SubjectIDs, Activities, and means and standard deviations of each
experimental measurement.
Column names were added to the measurements.
Data were then grouped by Subject Id and Activity and each column was averaged to make one row per SubjectID-Activity pair.