, pp.112-117 http://dx.doi.org/10.14257/astl.2016.139.25 Recognition of Anaerobic based on Machine Learning using Smart Watch Sensor Data SooHyun Cho 1, SooWon Lee 1* 1 The Graduate School of Software, Soongsil University, 369 Sangdo-Ro, Dongjak-Gu,, Seoul, 156-743, Korea {SooHyun Cho, SooWon Lee}, seanbrowncho@gmail.com Abstract. In recent years, there has been an upsurge in research on smart watch technology. Existing research and commercial applications for machines that recognize user behaviors have involved measuring aerobic exercise using physical displacement metrics rather than anaerobic exercise, which involves recognizing and measuring user behaviors using signal processing techniques or other instruments. In this paper, we have created a prototypical machine learning algorithm to measure anaerobic exercise with dumbbells to improve the recognition of physiologic markers of exercise. To do so, we have chosen three kinds of anaerobic exercise using dumbbells -- pull-ups, side pulls, and concentration curls -- to be monitored with a three-axis gyroscope sensor (motion sensor of a smart watch), a three-axis acceleration sensor, and a support vector machine (SVM) algorithm. Experimental results indicate a mean recognition rate of 97.7% with respect to the three kinds of exercise analyzed here. Keywords: 3axis-gyroscope, 3axis-accelerometer, svm, machine learning, smart watch, weightlifting, anaerobic exercise, recognition 1 Introduction As the use of wearable devices has increased while, at the same time, the performance of the various sensors that are embedded in smart watches has improved dramatically in recent years, many studies have attempted to push the utility of wearable devices to new heights. In particular, research on sensor data that can determine user behaviors, such as a three-axis gyroscope sensor, and on sports area has also increased. Due to their ability to make contact with users appendages, smart watches can recognize minute changes in user behaviors much more accurately than other smart devices. In this study, we utilize smart watch sensor data from a three-axis acceleration sensor and three-axis gyroscope sensor to classify three types of anaerobic exercise that can be done with dumbbells. In addition, we propose a classification method for these * Corresponding Author: Tel.:82+10-4102-3120; fax:82+2-814-8755. E-mail address: swlee@ssu.ac.kr ISSN: 2287-1233 ASTL Copyright 2016 SERSC
three anaerobic exercise using support vector machines (SVM), which enact supervised learning in the learning machine algorithm. 2 Relevant Research Research on behavior and posture recognition that captures a user s body movements has been conducted in computer science literature. Relevant topics include data mining, machine learning, and image processing, among others. At the same time, research on behavioral pattern recognition using smart watches has comprised topics such as signal processing and machine learning methods. In particular, there have been many studies on behavioral pattern recognition with three-axis acceleration and three-axis gyroscope sensors in three-dimensional space [1][2]. A previous study using a smart device with a built-in sensor showed a mean accuracy of more than 90% with a machine learning algorithm programmed to measure location changes such as going up and down the stairs and walking [3]. In contrast, a recent study examined the recognition of user behaviors and postures while biking, fast and slow walking, standing, and sitting, based on a SVM model using smartphone and wearable sensor data. This methodology exhibited a mean classification accuracy of 92.49% [4]. Another recent study attempted to classify location changes by identifying various behaviors including sitting, standing, walking, and running. To do so, the authors utilized an adaptive Naïve Bayes (A-NB) algorithm using smartphone sensor data to expand the types of data able to be processed with a Naïve Bayes algorithm. The average classification accuracy in this study was 92.96% [5]. However, this study also used a smartphone rather than a wearable device and attempted to classify only location changes. In fact, most methods from previous studies for solving classification problems were approached through SVM, which determines a weighted value that minimizes the error occurring in categorization by maximizing the distance between two categories [6]. Alternatively, excellent generalization performance of the SVM using less learning data has enabled superior classification methods in various fields compared to those using decision trees and artificial neural networks (ANN) [7]. Previous studies using traditional signal processing techniques rather than data mining and machine learning monitored user behavior in real time, converted user motion into camera image and angular velocity data, and compounded these metrics to recognize falling [8]. 3 Proposed Method 3.1 Classification of Exercises Three exercises that could be done with dumbbells were chosen for this study. The real time movement s name is Pull Up, Pull Side and Concentration Curl. Copyright 2016 SERSC 113
3.2 Data Collection The data used in this study was collected using Samsung Galaxy Gear smartwatches. Specifically, 20 adults over 20 years of age wore smartwatches and downloaded a smartwatch app that could collect data. Subjects were asked to randomly select different models of smartwatches (Gear 2, Gear S, or Gear S2) to reduce confounds from device-related errors. We obtained the raw data from a total of 200 sets for each exercise by prompting each subject to perform each of the three types of exercise 10 times. Data collected from the three-axis acceleration sensors and three-axis gyroscope sensors in the smartwatches were parsed into six streams: a X-axis acceleration sensor, Y-axis acceleration sensor, Z-axis acceleration sensor, X-axis gyroscope sensor, Y-axis gyroscope sensor, and Z-axis gyroscope sensor. 3.3 Preprocessing and Feature Extraction With respect to the six categories of data collected from the smartwatches, we extracted specific features by calculating and analyzing the maximum, minimum, average, variance, standard deviation, median, and root mean square (RMS) of each dataset. In terms of preprocessing, we implemented an I/O for the data collected through a Java-based program and created a specific feature-set for each exercise. The extracted features are shown in Fig. 3. A total of 42 dimensional features were created for one exercise. We then identified and labelled the appropriate class for each feature (class1 = pullup ; class2 = sidepull ; class3 = concentrationcurl ). Before the machine learned the SVM model, however, we reduced the feature-set to a low number using a dimensionality reduction technique for transforming highdimensional data into low-dimensional data. We conducted experiments using two different dimension reduction (DR) methods, principal component analysis (PCA) and linear discriminant analysis (LDA). The range of dimension reduction was from one to five dimensions, and both a linear-kernel as well as a rbf-kernel were used in these experiments. Each kernel comprises a technique for adjusting the hyperplane of the SVM model according to the distribution and dimension of the input data. Using each of the two-dimensional reduction techniques the five dimensions and two kernels we evaluated the accuracy of the 20 different experimental models (2 x 5 x 2). 3.4 Experimental Data There were 200 features extracted per exercise. We conducted experiments by parsing a total of 600 data points into learning data and verification data in a ratio of 8:2. 3.5 Experimental Environment The learned classifier, including the SVM, preprocessing module, and dataset -- were built on a web server, which communicated with the smartwatches using a HTTP 114 Copyright 2016 SERSC
protocol to send and receive data. The smartwatches were linked to the smartphones via Bluetooth and communicated with each other. The experimental environment is shown in Table 1. Table 1. Experimental Environment Client Operating System tizen 2.3.1 android 4.4 windows 7 Server ubuntu 14.04 Environment Details Samsung Galaxy Gear 2, Gear S, Gear S2 Samsung Galaxy S4 java SE7 AWS EC2, nginx 1.4.6, mariadb 5.5.44, python 2.7, flask 0.9, uwsgi 1.9.17.1, sqlalchemy 0.15 3.6 Model Building We repeated training and testing 10 times for each exercise by parsing the 600 extracted data points into learning and verification data in a ratio of 8:2. Therefore, the performance of the built model indicated the average value. The performance of the model is shown in Table 2. ( a) ( b) ( c) Accuracy (1) ( a) ( b) ( c) ( e) ( f ) ( g) ( h) ( i ) ( j ) Table 2. Classification Matrix L E Exercise 1 Exercise 2 Exercise 3 Exercise 1 (a) (e) (f) Exercise 2 (g) (b) (h) Exercise 3 (i) (j) (c) *E: experiment, L: correct answer Copyright 2016 SERSC 115
3.7 Experimental Results In this study, we tested the accuracy of 20 different machine learning models using a SVM algorithm, various dimension reduction techniques, PCA and LDA kernels, and dimension reduction techniques. When the SVM model was learned through a dataset that reduced high-dimensional features to two-dimensional features by using a linear kernel and PCA algorithm (PCA-SVM-linear; 2 dimensions), this model exhibited a mean classification accuracy of 97.7%. When comprehensively interpreting these experiments using the outlined conditions from this study, the linear kernel was superior to the rbf kernel. In terms of dimensional reduction techniques, the PCA was more useful than the LDA, given that it exhibited the best classification accuracy when reducing high-dimensional data to two dimensions. These experimental results are outlined in Table 3. Table 3. Experimental Results Dimension Reduction PCA PCA LDA LDA Kernel Dimension Accuracy (%) 1 0.9333 2 0.9777 linear 3 0.8666 4 0.8666 5 0.9000 1 0.3666 2 0.8333 rbf 3 0.2333 4 0.2333 5 0.2333 1 0.4444 2 0.6888 linear 3 0.5555 4 0.0222 5 0.0222 1 0.2666 2 0.3555 rbf 3 0.3111 4 0.3111 5 0.3111 116 Copyright 2016 SERSC
4 Conclusion In this study, a mean accuracy of 99.7% was shown when users performed three types of anaerobic exercises while wearing smartwatches in which a SVM classifier a classification model with a supervised learning algorithm for machine learning was embedded. Depending on the dimensional reduction technique and kernels utilized to handle the high-dimensional features used as an input, reporting accuracy greatly fluctuated. Therefore, we believe that the configuration of features to be used as learning data when troubleshooting user behavior recognition using a SVM algorithm, appropriate kernels and dimensional reduction techniques are crucial. Future studies should attempt to classify more types of anaerobic exercises with different machine learning algorithms, extract the appropriate variables for classification, and improve the overall reporting accuracy. Although the SVM algorithm is expected to perform well using relatively little data, it is necessary to collect more data for future experiments with other algorithms. References 1. Yoon, H., Lee, J-E., Lee, K.-T.: A Survey of Research Trends on Smart Watch Interaction. Journal of Korea Computer Congress, pp. 894-896 (2015) 2. Kim, S. H., Choi, J. S., Jeon, Y. H., Hong, S. B., Jang, S. J., Park, H. G.: Data Collection using Smart Watch and Machine Learning based Activity Condition Inference System. Journal of KICS, pp.34-35 (2015) 3. Kwapisz, J. R., Weiss, G. M., Moore, S. A.: Activity recognition using cell phone accelerometers. ACM Explorations Newsletter vol. 12, no. 2, pp. 74-82 (2011) 4. Lee, H. S., Lee, S. L.: Real-time Activity and Posture Recognition with Combined Acceleration Sensor Data from Smartphone and Wearable Device. Journal of KIISE, vol. 41, no. 8, pp. 58-597 (2014) 5. Han, M. H., Lee, S. L.: Personalized Activity Modeling and Real-time Activity Recognition based on Smartphone Multimodal Sensors. Journal of KIISE, vol 40, no 6, pp. 33-341 (2013) 6. Wikipedia, https://en.wikipedia.org/wiki/svm 7. Lee, Y. J., Lee, J. J.: A Novel Feature Selection Method for Output Coding based Multiclass SVM. Journal of KMMS, vol. 16, no 7, pp. 795-801 (2013) 8. Nyan, M. N., Tay, F. E. H., Tan, A. W. Y. and Seah, K. H. W.: Distinguishing fall activities from noraml activities by angular rate characteristics and high-speed camera characterization. Medical Engineering Pysics, vol. 28, pp. 842-849 (2006) Copyright 2016 SERSC 117