We seek to develop a human physical activity recognition model based on the UCI Machine learning Human Activity Recognition dataset
The experiments have been carried out with a group of 30 volunteers within an age bracket of 19-48 years. Each person performed six activities (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded accelerometer and gyroscope,3-axial linear acceleration and 3-axial angular velocity at a constant rate of 50Hz was captured The experiments have been video-recorded to label the data manually. The obtained dataset has been randomly partitioned into two sets, where 70% of the volunteers was selected for generating the training data and 30% the test data.
Checking the distribution of physical activities available in the data set Eliminating activities having very few data points Number of observations for each activity
Activities per individual:
Distribution of moving vs non moving activities
Logistic regression
Confusion Matrix\ Test_Label\ Y Label Moving Non-Moving\ Moving 1609 0\ Non Moving 0 1387
Support vector machines
Confusion Matrix \ Test_Label\ Y Label Moving Non-Moving\ Moving 1608 1\ Non Moving 0 1387
Random Forest
Confusion Matrix\ Test_Label\ Y Label Moving Non-Moving\ Moving 1609 0\ Non Moving 0 1387
Multinomial logistic regression:
Multiclass SVM:
Human physical activities can be recognition using Machine learning algorithms We could improve human activity recognition by including more activities and incorporating additional sensors providing data such as pulse rate could potentially help increase the reliability of human activity recognition dramatically.