• No results found

Human Activity Recognition on Smartphones using Machine Learning Algorithms

N/A
N/A
Protected

Academic year: 2020

Share "Human Activity Recognition on Smartphones using Machine Learning Algorithms"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

Human Activity Recognition on Smartphones

using Machine Learning Algorithms

Sandeep Kumar Polu PG Student

Department of Information Technology Acharya Nagarjuna University, India

Abstract

Activity Recognition is one among the most imperative period at the back of various applications like human survey system, clinical investigation and it is a functioning examination subject in smart homes and smart health. Smart mobiles are outfitted with various worked in detecting sensors like a gyroscope, accelerometer, GPS sensor and compass sensor. We can structure a device to catch the condition of the user. Activity Recognition (AR) framework takes the unrefined sensor data from compact sensors as sources of information and assessments a human movement using data mining and machine learning systems. In this paper, we examine the execution of two sort calculations i.e. Random Forest (RF) and Modified Random Forest (MRF) in an online Activity Recognition framework running on Android frameworks and this technique can underpin online training and class the utilization of the accelerometer data most successfully. For the most part, first, we utilize the Random Forest classification algorithm related next we tend to use an improvement of Modified Random Forest i.e. MRF. For the rationale of Activity Recognition, Modified Random Forest will expel the computational complexities of the Random Forest through developing decision trees (creating littler preparing units for each activity and class may be done dependent on those diminished preparing sets). We will expect the general execution of these classifiers from a movement of observations on human movements like sitting, walking, running, resting and standing in an online activity recognition contraption. On this paper, we're proposed to break down the general execution of classifiers with constrained preparing records and confined open memory on the smart devices contrasted with offline. Keywords: Human Activity Recognition, Smartphone sensors, Machine Learning, Random Forest, Modified Random Forest

_______________________________________________________________________________________________________

I. INTRODUCTION

These days smartphones became an increasing number of famous in human each day lifestyles. Most people used it looking for information, looking films, playing games and having access to the social community, however, there have been many useful studies on smartphones. Activity Recognition (AR) is one of the maximum vital technology behind many packages on a smartphone consisting of health tracking, fall detection, context-aware cellular packages, human survey gadget, and home automation and many others., Smartphone based activity recognition system is an energetic vicinity of studies because they could lead to new kinds of smart applications.

The combination of those smart devices in our everyday existence is swiftly developing. It is envisioned that such devices will seamlessly hold tune of our sports, study from them, and eventually assist us to make higher choices regarding our destiny actions. That is one key concept in which ambient intelligence is predicated on. In this paper, we employ a Smartphone for human activity recognition with ability programs in assisted living technology. We recall cutting-edge hardware boundaries and advocate a new alternative for Activity Recognition (AR) that requires less computational resources to perform.

Know-how human activities creating a demand in the fitness-care domain, specifically in rehabilitation help, physiotherapist help, and elder care guide offerings and cognitive impairment. Sensors will record and screen the patient's activities and record routinely while any abnormality is detected, so, a large number of resources may be saved. Different programs like human survey system and location indicator are all getting advantages from this have a look at.

Activity Recognition pursuits to perceive the moves accomplished by a person given a fixed of observations of itself and the encircling surroundings. Recognition may be executed, as an instance, through exploiting the data retrieved from inertial sensors such as accelerometers. In some smart devices, those sensors are embedded with the aid of default and we advantage from this to classify a set of physical activities (standing, laying, walking, strolling upstairs and strolling downstairs) by means of processing inertial frame indicators via a supervised machine learning (ML) algorithm for hardware with confined resources.

(2)

in activity recognition system. Section IV describes the proposed technique and in Section V experimental end result is defined. Ultimately, Section VI describes conclusion.

II. RELATED WORK

Activity recognition utilizing body-worn movement sensors general and particularly utilizing advanced mobile phone sensors have been examined as of late, and it is as yet being concentrated widely. There are likewise a couple of concentrates on activity recognition utilizing wrist-worn gadgets. For instance, in [6], the authors contemplated the job of smart wearable and advanced mobile phone sensors in activity recognition. They perceived nine physical exercises utilizing five classifiers. These exercises were sitting, standing, strolling, running, cycling, stair drop, stair climb, lift plunge and lift rising. Be that as it may, the authors examined these two gadgets independently and did not join sensor information from both of these gadgets. They utilized magnetometer, accelerometer, pressure sensors and gyroscope on the PDA and just an accelerometer on the smart wearable.

In [6], the authors utilized a wrist-worn sensor and a sensor on the hip to identify seven physical exercises. They utilized strategic relapse as a classifier. They demonstrated the capability of utilizing the wrist position for movement recognition. In any case, they assessed these two positions independently and did not join these two sensors. In [9], the authors utilize a solitary wrist-worn accelerometer to distinguish five physical exercises. These exercises were standing, sitting, strolling, lying and running. Thus, a wrist-worn accelerometer was utilized in [9] to perceive eight exercises, including the action of working on a computer.

III. SENSORS IN SMARTPHONES

Android gadgets have worked in sensors that estimates movement (accelerometers, gravity sensors, and gyrator), orientation (magnetometers.), and different ecological conditions (indicators, photometers, and thermometers). Equipment based sensors are physical parts incorporated with a PDA and they infer their crude information by specifically estimating particular natural parameters, for example, increasing speed, geomagnetic field quality, or precise change. Though, programming-based sensors (straight speeding up sensor and the gravity sensor) are not physical gadgets, despite the fact that they imitate hardware-based sensors. These are fit for furnishing data with high precision and valuable on the off chance that we needed to screen three-dimensional gadget development or situating. On the off chance that we needed to screen changes in the encompassing condition almost a gadget. The Android sensor system enables us to get to numerous sorts of sensors, for example, equipment based and programming-based sensors.

Programming based sensors get their crude information from at least one equipment-based sensors and are also called virtual sensors or engineered sensors. The android sensor structure utilizes a standard 3-hub organize the framework to express information esteems. For most sensors, the organizing framework is characterized with respect to the gadget's screen when the gadget is held in its default orientation (see fig 1). At the point when a gadget is held in its default orientation, the X-axis is level to the ground and indicates the right, the Y hub is vertical and focuses up, and the Z pivot indicates the outside of the screen confront. In this framework, arranges behind the screen have negative Z esteems.

Accelerometer

(3)

Fig. 2: Accelerometer Directions on a Smartphone

Compass sensor

The smart Compass is a customary device to distinguish the heading as for the north-south shaft of the earth's magnetic field. Compass usefulness in cell phones is normally founded on a more complex sensor called a magnetometer; it is utilized to quantify the quality and course of attractive fields. Fig 2 demonstrates the compass perusing show screen on a Smartphone. By breaking down Earth's magnetic field, the sensor enables the device to decide its orientation with high precision. The crude information perusing from a compass sensor is the float number somewhere in the range of 0o and 360o. It starts from 0o as absolute the north and the real perusing shows the angle between present mobile phone direction and absolute north in clockwise. The Proforma of Smart Compass includes a speedometer and the alternative to send GPS arranges by means of SMS or email. Compass perusing can be utilized to distinguish the bearing change in the human movement, for example, strolling.

Fig. 3: Compass on a Smartphone

Gyroscope

(4)

Fig. 4: Gyroscope on a Smartphone

GPS (Global Positioning System) Sensor

Global Positioning System (GPS), initially created and set up for military operations and was made accessible for everybody in the1980s by Government. GPS is a framework which tracks the objective or 'navigates' the things by picture or map with the assistance of GPS satellites. iPhone series, HTC android mobiles, Samsung Galaxy smartphones, Sony, Nokia Lumia, and numerous more smartphones bolster GLONASS (Globalnaya Navigatsionnaya Sputnikovaya Sistema) GPS framework for navigation feature.

Fig. 5: Navigation on a Smartphone

IV. PROPOSED METHODOLOGY

Dataset Description

The dataset is collected from the UCI Machine Learning Repository. The Human movement recognition utilizing smart mobile dataset are utilized by the research and development department for test purposes.

Random Forest Approach

(5)

2) There is no requirement for feature normalization. 3) Individual decision trees can be prepared in parallel. 4) They decrease overfitting.

5) It runs proficiently on large data sets.

6) It figures proximities between sets of cases that can be utilized in locating outliers, clustering gives intriguing perspectives of the information.

Each tree is built utilizing the accompanying algorithm:

 Let the quantity of preparing cases be N, and the quantity of factors in the classifier is M.

 The number m of input factors to be utilized to decide the decision at a node of the tree; m ought to be considerably less than M.

 Choose a training set for this tree by picking n times with substitution from all N accessible preparing cases (i.e. take a bootstrap test). Utilize whatever is left of the cases to evaluate the error of the tree, by anticipating their classes.

 For every node of the tree, haphazardly pick m factors on which to base the choice at that node.  Calculate the best split dependent on these m factors in the training set.

 Each tree is completely developed and not pruned (as might be done in building an ordinary tree classifier).

For expectation, another example is pushed down the tree. It is appointed the name of the training test in the terminal node it winds up in. This technique is iterated over all trees in the troupe, and the normal vote of all trees is accounted for as random forest prediction.

Fig. 6: Random Forest Algorithm Flowchart

V. EXPERIMENTAL RESULTS

In this segment, we have compared the execution of the Random Forest model dependent on the confusion matrix and the time taken to prepare the model. Time taken to prepare the model is computed by taking mean of 30 reproductions.

(6)

From the confusion matrix, it is seen that the percentage error rate is 6.25% and the percentage success rate is 93.75%. Time taken to prepare the model is 10.56 seconds.

To assess the execution of the modified RF classification for every movement, the parameters of the confusion matrix is computed as pursues, for example, recall, accuracy, F1 measure, and precision. The confusion matrix delineates the more exactness of the answer for a classification problem. The ordered result can be gotten from the true positive, false positive, true negative and false negative rate. One favorable position of the confusion matrix is that it is anything but difficult to check whether the framework is confusing two classes. A confusion matrix contains data about known class labels and anticipated class labels. Contrasted with the execution of exercises like running, resting, standing and sitting, the RF classifier displays the somewhat more terrible execution for strolling, where this movement is in some cases delegated running or standing. In any case, the general execution for modified RF order is around 93% exactness thinking about all activities.

The dataset holds 10299 occurrences and 561 traits. For this information, confusion matrix parameters are computed as pursues:

Table – 1

Predicted Positive Predicted Negative

Observed Positive TP 1515 FN 88

Observed Negative FP 102 TN 958

P=TP/(TP+FP) = 0.9369 R=TP/(TP+FN) = 0.9451 F1 = 2x[(PXR)/(P+R)] = 0.9409

A = (TP+TN)/N = 0.9286

Fig. 8: The Accuracy Proportion of Random Forest Algorithm and the Modified Random Forest Algorithm for the Human Activity Recognition Utilizing Smart Mobile

Fig. 9: The Chart Demonstrates the Distinction between the Random Forest Algorithm and a Modified Random Forest Algorithm

(7)

of the dataset is assessed utilizing modified RF. The modified RF grouping display a vastly improved execution than the RF classifier regarding exactness on Android stages with constrained assets. We additionally assessed the execution of altered RF as far as execution times. Also, arrangement times are exceedingly subject to the gadget model and abilities too.

Future Aspects

This model can be utilized to anticipate Human Activity on continuous premise. An application on Android Platform can be utilized to pass on estimations and run the model on those estimations. This model has parts of observing the wellbeing and performance of athletes and so on.

REFERENCES

[1] Trost S.G., Zheng Y., Wong W.K. Machine learning for activity recognition: Hip versus wrist data. Physiol. Meas. 2014;35:2183-2189. doi:

10.1088/0967-3334/35/11/2183. [PubMed] [Cross Ref].

[2] Chernbumroong S., Atkins A.S., Yu H. Activity classification using a single wrist-worn accelerometer; Proceedings of the 2011 5th IEEE International Conference on Software, Knowledge Information, Industrial Management and Applications (SKIMA); Benevento, Italy. 8-11 September 2011; pp. 1-6.

[3] Ramos-Garcia R.I., Hoover A.W. A study of temporal action sequencing during consumption of a meal; Proceedings of the ACM International Conference

on Bioinformatics, Computational Biology and Biomedical Informatics; Washington, DC, USA. 22-25 September 2013; p. 68.

[4] S., Subbaraju V., Misra A., Balan R., Lee Y. The case for smartwatch-based diet monitoring; Proceedings of the 2015 IEEE International Conference on

Pervasive Computing and Communication Workshops (PerCom Workshops); St. Louis, MO, USA. 23-27 March 2015; pp. 585-590.

[5] Parate A., Chiu M.C., Chadowitz C., Ganesan D., Kalogerakis E. Risq: Recognizing smoking gestures with inertial sensors on a wristband; Proceedings of

the 12th Annual International Conference on Mobile Systems, Applications, and Services; Bretton Woods, NH, USA. 16- 19 June 2014; pp. 149-161.

[6] Scholl P.M., Van Laerhoven K. A Feasibility Study of Wrist-Worn Accelerometer Based Detection of Smoking Habits; Proceedings of the 2012 Sixth IEEE

International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing (IMIS); Palermo, Italy. 4-6 July 2012; pp. 886-891.

[7] Da Silva F.G., Galeazzo E. Accelerometer based intelligent system for human movement recognition; Proceedings of the 2013 5th IEEE International

Workshop on Advances in Sensors and Interfaces (IWASI); Bari, Italy. 13-14 June 2013; pp. 20-24.

[8] Shoaib M., Bosch S., Incel O.D., Scholten H.Havinga P.J. Fusion of smartphone motion sensors for physical activity recognition. Sensors

2014;14:10146-10176. doi: 10.3390/s140610146.[PMCfree article] [PubMed] [Cross Ref].

[9] Varkey J.P., Pompili D., Walls T.A. Human motion recognition using a wireless sensor-based wearable system. Pers. Ubiquitous Comput. 2012;16:897-910.

doi: 10.1007/s00779-011-0455-4.

[10] Apple. UIAcceleration Class Reference. https://developer.apple.com/library/ios/documentation/uikit/reference/UIAcceleration_Class/Reference/UIAccel

eration.h tml, 2014. [Online; accessed 17-March-2014].

[11] Shoaib M. Human activity recognition using heterogeneous sensors; Proceedings of the Adjunct Proceedings of the 2013 ACM Conference on Ubiquitous

Computing; Zurich, Switzerland. 8-12 September 2013.

[12] W.-Y. Deng, Q.-H. Zheng, and Z.-M. Wang. Cross-person activity recognition using reduced kernel extreme learning machine. Neural Network.

[13] Labrador; Miguel A. Human Activity Recognition: Using Wearable Sensors and Smartphones

[14] Reyes Ortiz, Jorge Luis. Smartphone-Based Human Activity Recognition

[15] Sandeep Kumar Polu. "Security Enhancement for Data Objects in Cloud Computing" International Journal for Innovative Research in Science & Technology

Volume 5 Issue 6 2018 Page 18-21

Figure

Fig. 2: Accelerometer Directions on a Smartphone
Fig. 4: Gyroscope on a Smartphone
Fig. 7: Confusion Matrix of Data Tested with Random Forest Model
Fig. 8: The Accuracy Proportion of Random Forest Algorithm and the Modified Random Forest Algorithm for the Human Activity  Recognition Utilizing Smart Mobile

References

Related documents

As for above issues, this paper presents an accurate and efficient strip-mode SAR raw data simulator of extended scene included fixed and moving targets, where an general

BioMed Central World Journal of Surgical Oncology ss Open AcceResearch Aberrant nuclear localization of ? catenin without genetic alterations in ? catenin or Axin genes in esophageal

These heterogeneous effects of minimum wage on the innovation of the two types of firms are consistent with the empirical results that we have estimated using city-level data on

The term "OMIT Data" as used in this contract is defined as all technical data (including computer software documentation), development tools, graphics, and computer

The main advantages of this approach are its flex- ibility in combining information from multiple database rec- ords and using the information from multiple fraud detectors to

The focus of this chapter is to examine the impact of credit, labour and business regulation on bank efficiency using the regulation variables of the Fraser

A three phase VSC based DSTATCOM has been implemented for compensation of nonlinear loads using BPT control algorithm to verify its effectiveness. The proposed

Thesis title: A Comparative Bacterial Microleakage Study of Several Retrofilling Materials.. Master of Science degree