Human Activity Recognition Using ML Techniques
Human Activity Recognition Using ML Techniques
Human Activity Recognition Using ML Techniques
ISSN No:-2456-2165
Abstract:- With the advancement of new technologies in External Sensors refers to surveillance cameras.
our emerging world, Every part of our life has become Although these have high applicability, there are even more
an Activity. Monitoring Human activities has been an disadvantages as they lack individual’s privacy as everyone
active research area since past few years with the growth are not acceptable of getting permanently monitored by
of increasing demands in Health Sector. This research cameras. Besides this, these sensors are computational
helps to detect Emergency situations and provides quick demanding. So, with all these mentioned disadvantages, it is
aid for aged people. Many Sensor based Approaches more convenient to use wearable Sensors which are attached
have been introduced such as Accelerometer, Gyroscope. to our body. Wearable sensors monitor environment
This research paper covers predicting Activity of human attributes, physiological attributes and dynamic attributes. In
using Decision Trees and Random Forest. It also this context, Human activity recognition has been an active
discusses advantages and disadvantages of mentioned research field, which has great application prospects in
Sensor technologies. We have considered Various intelligent video surveillance, human-computer interaction
activities such as Running, walking, Laying, Standing and so on[2]. It is capable of recognizing various physical
etc. in our present proposed model. Firstly, Paper starts activities such as running, walking, sleeping, Laying and so
with discussing problem of the occupational diseases and on. So this has become a key topic of research in wireless,
Preventing People from these diseases. Then the smartphones and mobile computing. In our research, we
collected data is trained and evaluated by ML have used Accelerometer and Gyroscope sensors, and a
Techniques. The trained model shows a satisfactory dataset which consist of signals from accelerometer and
performance in all the stages. Finally, a recognition gyroscope of a smartphone carried by different men and
system has been developed with an accuracy of 93% in women volunteers while doing different activities are
Random Forest Classifier. Experimental results showed classified using different machine learning approaches[3].
that compared to Decision Tree Classifier, Random We have selected random forest approach as it shows better
Forest Classifier predicts better over these various accuracy compared to decision trees
activities.
1.1 Accelerometer and Gyroscope
Keywords:- Machine Learning , Decision Trees , Random Accelerometers in smartphones are used to detect the
Forest , Classification , Sensors. orientation of the phone. They use microscopic crystals that
go under stress when vibrations occur, and from that stress a
I. INTRODUCTION voltage will be generated which creates a reading on any
acceleration. The gyroscope adds a dimension to the
Electronic gadgets have become a most crucial part in information supplied by the accelerometer by tracking
human's life. With the advancement of technology, they get rotation or twist.
more capable to meet customers needs and expectations.
Everywhere we go, we carry our electronic gadget. To An accelerometer measures linear acceleration of
increase the power of these Electronic gadgets, let's say movement, while a gyroscope measures the angular
Smartphones, designers added new modules and devices to rotational velocity. Both sensors measure rate of change; the
the hardware. In this functionality, Sensors plays a major only difference is they just measure the rate of change for
role as they are embedded in smartphones and can be used different things.
to collect user's daily life activities. Collecting this daily life
activities majorly benefits health sectors. There is a rapid Data retrieved from the accelerometer will be
increase in Occupational Diseases, they may be heavy processed to detect changes in movement. Signals retrieved
physical work, poor posture, low level of work satisfaction. by the gyroscope will be processed to detect the position
Consequently, these factors may cause some physical and alignment of the device. As there is a meaningful
diseases on the workers, as example the musculoskeletal difference of characteristics between data retrieved from
disorders, affecting the tendons, the ligaments, the these sensors, there will be many features generated from
peripheral nerves and can even lead to more damage. So, these sensors data to determine activity of the Person
due to this problem, two types of sensors have been carrying the device.
initiated. Wearable Sensors and External Sensors.
Fig : A figure of Flowchart for Accelerometer and Gyroscope. Left flowchart Represents the Accelerometer And right Flow chart
Represents the Gyroscope
1.2 Activity Recognition Methodology Using accelerometer and gyroscope sensors which are
initiated in Smartphone, we captured 3-axial linear
A. Data Collection acceleration and 3-axial angular velocity at a constant rate of
The dataset consists of signals from a smartphone 50Hz. The obtained dataset has been randomly partitioned
carried by 30 volunteers within an age of 19-48 years, into two sets, where 70% of the volunteers was selected for
individuals performing 6 different activities. The cell phone generating the training data and 30% the test data.
based triaxial accelerometer data gives acceleration along
the three axes (X, Y and Z).[5]. Activities performed are Dataset can be found here:
listed below with their corresponding codes. https://archive.ics.uci.edu/ml/datasets/human+activity+reco
gnition+using+smartphones
• WALKING - 1
• CLIMBING UP THE STAIRS - 2 B. Data Preprocessing
• CLIMBING DOWN THE STAIRS - 3 As it is known, due to the nature of the inertial sensors,
• SITTING - 4 the acquired data should firstly pass through a preprocessing
• STANDING - 5 stage[4]. Data may contain noise which is needed to be
• LAYING - 6 filtered out. It may contain unwanted information like null
values. Here Data will be filtered and balanced data will be
made
Fig : Fig shows confusion matrix, recall and precision of Decision Tree
Random Forests:
Random forest, consists of many individual decision trees. Each individual tree in the random forest is a class prediction,
and the class with the many votes will be our model’s prediction.
Fig : Fig shows confusion matrix, recall and precision of Random Forest
II. CONCLUSION such as Health Sector for monitoring patients and taking
preventions before anything happens seriously, Employment
In this paper Human Activity Recognition System, we sector to monitor an employee to correctly perform the task
proposed a model trained using different algorithms, While
Random Forest is the most precise approach tested in this REFERENCES
work with an accuracy of 93%. This work could be
improved by increasing the number of activities and [1]. Nilam Nur Amir Sjarif, Siti Mariyam
Situations to classify and to add data received from other Shamsuddin(2015-IEEE). Human Action
sensors and devices that are commonly used in smartphones Invarianceness for Human Action Recognition.978-1-
to the dataset[3]. This model can be used in various sectors 4673-6744-8