A Smartphone Lightweight Method for Human Activity Recognition Based on Information Theory
Abstract
:1. Introduction
2. The Human Activity Recognition Process Overview
3. The Discrete Domain of Sensors Data
- (a)
- Approximation: it is a mapping of a time series in a low dimension space, represented by real values. This parameter consists on word size, , which represents the number of values for the approximation. The smaller the word size, the greater the reduction of noise, but the loss of information increases;
- (b)
- Quantization: Each real value obtained in the approximation process is mapped to a discrete value, which is interpreted as a symbol. This parameter is defined as the alphabet size , which is used in quantization. A small alphabet also results in a strong noise reduction.
3.1. Symbolic Aggregation Approximation
3.2. Symbolic Fourier Approximation
3.3. Time-Series Bag-of-Patterns Representation
4. HAR-SR: Human Activity Recognition Based on Symbolic Representation
4.1. Data Acquisition, Segmentation and Data Fusion
4.2. The Symbolic Representation of Sensors Signals
4.3. A New Feature Set from Information Theory
4.4. Classification Model
- 1.
- The training
- (a)
- A time series dataset is an unordered set of N time series, k is the number of classes, is the time series, and is the label associated with the series ;
- (b)
- Creation of a reference histogram for each of the classes. For example, for two classes, , where is the uniform histogram and and are the reference histogram for class A and class B, respectively;
- (c)
- For each time series , apply the segmentation , with , the data fusion, perform the discretization to obtain the histogram ;
- (d)
- Calculation of statistical measures using each reference histogram.
- (e)
- Generation of the training set from the statistical measures.
- 2.
- The classification
- (a)
- Given a new series not labeled ;
- (b)
- Apply the segmentation, the data fusion, and the discretization to obtain the histogram ;
- (c)
- Calculate the statistical measures that use the reference histograms obtained in the training phase, resulting in the feature vector of the series;
- (d)
- The label associated with the series closest to the series will be assigned to the uncollected series , using the cosine similarity metric.
4.5. Computational Analysis
5. Experimental Protocol
5.1. Datasets
5.1.1. SHOAIB Dataset
5.1.2. WISDM Dataset
5.1.3. UCI Dataset
5.1.4. Summarization of Datasets
5.2. Baselines
- (a)
- a shallow approach based on hand-crafted feature extraction from the time and frequency domain of the signal, called TF. The list of the mathematical functions used to create the feature set is found in Table 5;
- (b)
- a discrete domain classification method, SAX-VSM. SAX-VSM uses a technique called tf-idf in the frequency histogram symbols of each activity class to obtain a weighted frequency matrix. The result is an array that contains an instance for each activity and will be the feature set used by the classification model;
- (c)
- a discrete domain classification method, BOSS-VS classifier. Like SAX-VSM, the BOSS-VS uses tf-idf in the frequency histogram to obtain a weighted frequency matrix for each activity. The parameters used in the comparison of the methods are shown in Table 6.
5.3. Validation Procedures
5.4. Scenarios
- (a)
- Scenario A evaluated the parameters used by the discretization methods. The symbolic representation algorithms (SAX and SFA) had parameters such as the word, alphabet, and window sizes. The complexity of these methods could evolve as the value of these variables grew.
- (b)
- Scenario B evaluated data fusion techniques, magnitude, PCA, and signal concatenation. The data fusion techniques played an important role: providing the highest quality signal compared to each signal individually. This study is important because the complex calculation of the algorithms that make up the SAX and SFA are calculated based on the input data. In this case, it was necessary for the chosen technique to transform a multidimensional signal into a one-dimensional signal, preserving the characteristics of the signals;
- (c)
- Scenario C evaluated the methods of symbolic representation by the position of the smartphone. This scenario was useful for showing the differences between representations and their impact on rating method performance. Four groups of different sensors (SG1, SG2, SG3, SG4) were used to train and test the classification method. The idea was to show what the impact was on the performance of the classification method when adding a new sensor. Another result obtained in this scenario shows how each sensor group behaved according to the positions in which the smartphone was located;
- (d)
- Scenario D evaluated the performance of the proposed method HAR-SR with three works in the literature. The first work, called TF method, used a total of 145 hand-crafted features belonging to the time and frequency domain. The last two other works were feature learning approaches of the discrete domain, similar to the proposed method.
6. Results
6.1. Scenario A: Parameter Evaluation
6.2. Scenario B: Data Fusion
6.3. Scenario C: Evaluation of Symbolic Algorithms by Position
6.4. Scenario D: Comparison of HAR-SR with Other Studies
Confusion Matrix Analysis
6.5. Discussion
7. Related Works
8. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Lara, O.D.; Labrador, M.A. A Survey on Human Activity Recognition using Wearable Sensors. IEEE Commun. Surv. Tutor. 2013, 15, 1192–1209. [Google Scholar] [CrossRef]
- Shoaib, M.; Bosch, S.; Incel, O.; Scholten, H.; Havinga, P. A Survey of Online Activity Recognition Using Mobile Phones. Sensors 2015, 15, 2059–2085. [Google Scholar] [CrossRef]
- Lathia, N.; Sandstrom, G.M.; Mascolo, C.; Rentfrow, P.J. Happier people live more active lives: Using smartphones to link happiness and physical activity. PLoS ONE 2017, 12, e0160589. [Google Scholar] [CrossRef]
- Nweke, H.F.; Teh, Y.W.; Al-garadi, M.A.; Alo, U.R. Deep learning algorithms for human activity recognition using mobile and wearable sensor networks: State of the art and research challenges. Expert Syst. Appl. 2018, 105, 233–261. [Google Scholar] [CrossRef]
- Li, F.; Shirahama, K.; Nisar, M.; Köping, L.; Grzegorzek, M. Comparison of Feature Learning Methods for Human Activity Recognition Using Wearable Sensors. Sensors 2018, 18, 679. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sousa Lima, W.; Souto, E.; El-Khatib, K.; Jalali, R.; Gama, J. Human Activity Recognition Using Inertial Sensors in a Smartphone: An Overview. Sensors 2019, 19, 3213. [Google Scholar] [CrossRef] [Green Version]
- Figo, D.; Diniz, P.C.; Ferreira, D.R.; Cardoso, J.M.P. Preprocessing techniques for context recognition from accelerometer data. Pers. Ubiquitous Comput. 2010, 14, 645–662. [Google Scholar] [CrossRef]
- Duda, R.O.; Hart, P.E.; Stork, D.G. Pattern Classification, 2nd ed.; Wiley-Interscience: New York, NY, USA, 2000; p. 688. [Google Scholar]
- Anguita, D.; Ghio, A.; Oneto, L.; Parra, X.; Reyes-Ortiz, J.L. A public domain dataset for human activity recognition using smartphones. In Proceedings of the European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, Bruges, Belgium, 24–26 April 2013; pp. 24–26. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- Ronao, C.A.; Cho, S.b. Human activity recognition with smartphone sensors using deep learning neural networks. Expert Syst. Appl. 2016, 59, 235–244. [Google Scholar] [CrossRef]
- Kolosnjaji, B.; Eckert, C. Neural network-based user-independent physical activity recognition for mobile devices. In Proceedings of the 16th International Conference on Intelligent Data Engineering and Automated Learning, Wroclaw, Poland, 14–16 October 2015; pp. 378–386. [Google Scholar]
- Ravi, D.; Wong, C.; Lo, B.; Yang, G.Z. Deep learning for human activity recognition: A resource efficient implementation on low-power devices. In Proceedings of the 13th IEEE International Conference on Wearable and Implantable Body Sensor Networks, San Francisco, CA, USA, 14–17 June 2016; pp. 71–76. [Google Scholar]
- Ignatov, A. Real-time human activity recognition from accelerometer data using Convolutional Neural Networks. Appl. Soft Comput. 2018, 62, 915–922. [Google Scholar] [CrossRef]
- Hur, T.; Bang, J.; Lee, J.; Kim, J.I.; Lee, S. Iss2Image: A Novel Signal-Encoding Technique for CNN-Based Human Activity Recognition. Sensors 2018, 18, 3910. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Chung, S.; Lim, J.; Noh, K.J.; Kim, G.; Jeong, H. Sensor Data Acquisition and Multimodal Sensor Fusion for Human Activity Recognition Using Deep Learning. Sensors 2019, 19, 1716. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ravi, D.; Wong, C.; Deligianni, F.; Berthelot, M.; Andreu-Perez, J.; Lo, B.; Yang, G.Z. Deep Learning for Health Informatics. IEEE J. Biomed. Health Inform. 2017, 21, 4–21. [Google Scholar] [CrossRef] [Green Version]
- Bagnall, A.; Lines, J.; Bostrom, A.; Large, J.; Keogh, E. The great time series classification bake off: A review and experimental evaluation of recent algorithmic advances. Data Min. Knowl. Discov. 2016, 31, 1–55. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Lin, J.; Keogh, E.; Lonardi, S.; Chiu, B. A Symbolic Representation of Time Series, with Implications for Streaming Algorithms. In Proceedings of the 8th ACM SIGMOD Workshop on Research Issues in Data Mining and Knowledge Discovery, San Diego, CA, USA, 13 June 2003; pp. 2–11. [Google Scholar] [CrossRef]
- Lin, J.; Khade, R.; Li, Y. Rotation-invariant similarity in time series using bag-of-patterns representation. J. Intell. Inf. Syst. 2012, 39, 287–315. [Google Scholar] [CrossRef] [Green Version]
- Senin, P.; Malinchik, S. SAX-VSM: Interpretable time series classification using sax and vector space model. In Proceedings of the IEEE 13th International Conference on Data Mining, Dallas, TX, USA, 7–10 December 2013; pp. 1175–1180. [Google Scholar] [CrossRef]
- Schäfer, P.; Högqvist, M. SFA: A symbolic fourier approximation and index for similarity search in high dimensional datasets. In Proceedings of the 15th International Conference on Extending Database Technology, Berlin, Germany, 27–30 March 2012; pp. 516–527. [Google Scholar] [CrossRef]
- Schäfer, P. Scalable time series classification. Data Min. Knowl. Discov. 2016, 30, 1273–1298. [Google Scholar] [CrossRef]
- Montero Quispe, K.G.; Sousa Lima, W.; Macêdo Batista, D.; Souto, E. MBOSS: A Symbolic Representation of Human Activity Recognition Using Mobile Sensors. Sensors 2018, 18, 4354. [Google Scholar] [CrossRef] [Green Version]
- Manning, C.D.; Raghavan, P.; Schütze, H. Introduction to Information Retrieval; Cambridge University Press: New York, NY, USA, 2008. [Google Scholar]
- Martin, M.T.; Plastino, A.; Rosso, O.A. Generalized statistical complexity measures: Geometrical and analytical properties. Phys. A Stat. Mech. its Appl. 2006, 369, 439–462. [Google Scholar] [CrossRef]
- Antonelli, M.; De Micco, L.; Larrondo, H.; Rosso, O.A. Complexity of Simple, Switched and Skipped Chaotic Maps in Finite Precision. Entropy 2018, 20, 135. [Google Scholar] [CrossRef] [Green Version]
- Shoaib, M.; Bosch, S.; Incel, O.D.; Scholten, H.; Havinga, P.J.M. Complex human activity recognition using smartphone and wrist-worn motion sensors. Sensors 2016, 16, 426. [Google Scholar] [CrossRef]
- Khan, W.Z.; Xiang, Y.; Aalsalem, M.Y.; Arshad, Q. Mobile Phone Sensing Systems: A Survey. IEEE Commun. Surv. Tutor. 2013, 15, 402–427. [Google Scholar] [CrossRef]
- Incel, O.D.; Kose, M.; Ersoy, C. A Review and Taxonomy of Activity Recognition on Mobile Phones. Bionanoscience 2013, 3, 145–171. [Google Scholar] [CrossRef]
- Kwapisz, J.R.; Weiss, G.M.; Moore, S.A. Activity recognition using cell phone accelerometers. ACM SIGKDD Explor. Newsl. 2011, 12, 74–82. [Google Scholar] [CrossRef]
- Dernbach, S.; Das, B.; Krishnan, N.C.; Thomas, B.; Cook, D. Simple and Complex Activity Recognition through Smart Phones. In Proceedings of the 2012 Eighth International Conference on Intelligent Environments, Guanajuato, Mexico, 26–29 June 2012; pp. 214–221. [Google Scholar]
- Gao, X.; Luo, H.; Wang, Q.; Zhao, F.; Ye, L.; Zhang, Y. A human activity recognition algorithm based on stacking denoising autoencoder and lightGBM. Sensors 2019, 19, 947. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Witten, I.H.; Frank, E.; Hall, M.A.; Pal, C.J. Data Mining: Practical Machine Learning Tools and Techniques; Morgan Kaufmann: San Francisco, CA, USA, 2016; p. 664. [Google Scholar]
- He, K.; Sun, J. Convolutional neural networks at constrained time cost. In Proceedings of the IEEE conference on computer vision and pattern recognition, Boston, MA, USA, 7–12 June 2015; pp. 5353–5360. [Google Scholar]
- Lima, W.S.; Bragança, H.L.S.; Quispe, K.G.M.; Souto, J.P. Human Activity Recognition based on Symbolic Representation Algorithms for Inertial Sensors. Sensors 2018, 18, 4045. [Google Scholar] [CrossRef] [Green Version]
- Schäfer, P. The BOSS is concerned with time series classification in the presence of noise. Data Min. Knowl. Discov. 2015, 29, 1505–1530. [Google Scholar] [CrossRef]
- Shirahama, K.; Grzegorzek, M. On the Generality of Codebook Approach for Sensor-Based Human Activity Recognition. Electronics 2017, 6, 44. [Google Scholar] [CrossRef] [Green Version]
- Patel, P.; Keogh, E.; Lin, J.; Lonardi, S. Mining motifs in massive time series databases. In Proceeding of the IEEE International Conference on Data Mining, Maebashi City, Japan, 9–12 December 2002; pp. 370–377. [Google Scholar]
- Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Distributed Representations of Words and Phrases and their Compositionality. In Proceeding of the 26th International Conference on Neural Information Processing Systems, Lake Tahoe, NV, USA, 5–10 December 2013; pp. 3111–3119. [Google Scholar] [CrossRef]
- Riedl, M.; Wessel, N. Practical considerations of permutation entropy. Eur. Phys. J. Spec. Top. 2013, 262, 249–262. [Google Scholar] [CrossRef]
- Nakamura, E.F.; Loureiro, A.a.F.; Frery, A.C. Information fusion for wireless sensor networks. ACM Comput. Surv. 2007, 39, Article 9. [Google Scholar] [CrossRef]
- Bandt, C.; Pompe, B. Permutation entropy—A complexity measure for time series. Phys. Rev. Lett. 2002, 88, 174102. [Google Scholar] [CrossRef]
- Rosso, O.A.; De Micco, L.; Larrondo, H.A.; Martín, M.T.; Plastino, A. Generalized Statistical Complexity Measure. Int. J. Bifurc. Chaos 2010, 20, 775. [Google Scholar] [CrossRef]
- Shannon, C.E.; Weaver, W. A Mathematical Theory of Communication; University of Illinois Press: Champaign, IL, USA, 1963; p. 144. [Google Scholar]
- Rosso, O.A.; Larrondo, H.A.; Martin, M.T.; Plastino, A.; Fuentes, M.A. Distinguishing noise from chaos. Phys. Rev. Lett. 2007, 99, 1–4. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Shoaib, M.; Scholten, H.; Havinga, P. Towards Physical Activity Recognition Using Smartphone Sensors. In Proceedings of the 2013 IEEE 10th International Conference on Ubiquitous Intelligence and Computing and 2013 IEEE 10th International Conference on Autonomic and Trusted Computing, Vietri sul Mare, Italy, 18–21 December 2013; pp. 80–87. [Google Scholar]
- Lockhart, J.W.; Weiss, G.M. Limitations with activity recognition methodology & data sets. In Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct Publication, Seattle, WA, USA, 13–17 September 2014; pp. 747–756. [Google Scholar]
- Morales, J.; Akopian, D. Physical activity recognition by smartphones, a survey. Biocybern. Biomed. Eng. 2017, 37, 388–400. [Google Scholar] [CrossRef]
- Micucci, D.; Mobilio, M.; Napoletano, P. Unimib shar: A dataset for human activity recognition using acceleration data from smartphones. Appl. Sci. 2017, 7, 1101. [Google Scholar] [CrossRef] [Green Version]
- Siirtola, P.; Koskimäki, H.; Huikari, V.; Laurinen, P.; Röning, J. Improving the classification accuracy of streaming data using SAX similarity features. Pattern Recognit. Lett. 2011, 32, 1659–1668. [Google Scholar] [CrossRef]
- Akimura, D.; Kawahara, Y.; Asami, T. Compressed sensing method for human activity sensing using mobile phone accelerometers. In Proceedings of the 2012 9th International Conference on Networked Sensing (INSS), Antwerp, Belgium, 11–14 June 2012; pp. 1–4. [Google Scholar]
- Quispe, K.G.M.; Lima, W.S.; Souto, E.J.P. Human activity recognition on smartphones using symbolic data representation. In Proceedings of the 24th Brazilian Symposium on Multimedia and the Web, Salvador, BA, Brazil, 16–19 October 2018; pp. 93–100. [Google Scholar]
- Gani, M.O.; Fayezeen, T.; Povinelli, R.J.; Smith, R.O.; Arif, M.; Kattan, A.J.; Ahamed, S.I. A light weight smartphone based human activity recognition system with high accuracy. J. Netw. Comput. Appl. 2019, 141, 59–72. [Google Scholar] [CrossRef]
Divergence | Complexity |
---|---|
... | ... |
0.54 | 0.07 | 0.10 | 0.06 | … | 0.06 | 0.04 | 0.05 | 0.03 | … | 0.03 | A |
0.49 | 0.08 | 0.06 | 0.08 | … | 0.02 | 0.04 | 0.03 | 0.10 | … | 0.02 | B |
… | … | … | … | … | … | … | … | … | … | … | … |
0.49 | 0.08 | 0.12 | 0.10 | … | 0.01 | 0.04 | 0.05 | 0.15 | … | 0.03 | A |
Method | Complexity |
---|---|
Dataset | SHOAIB SH | WISDM | UCI |
---|---|---|---|
Individuals | 10 | 19 (36) | 30 |
Hz | 50 | 20 | 50 |
Sensors | Accelerometer, Gyroscope *, Magnetometer * | Accelerometer | Accelerometer, Gyroscope * |
Location | Belt, Left Pocket, Right Pocket, Upper Arm, Wrist | Belt | Belt |
Activities used | Walking, Running, Sitting, Standing, Walking Upstairs, Walking Downstairs, Jogging *, Biking * | Walking, Jogging, Sitting Standing, Walking Upstairs, Walking Downstairs | Walking, Lying Down, Sitting, Standing, Walking Upstairs, Walking Downstairs |
Domain | Features |
---|---|
Time | min, max, amplitude, amplitude peak, sum, absolute sum, Euclidean norm, mean, absolute mean, mean square, mean absolute deviation, sum square error, variance, standard deviation, Pearson coefficient, zero crossing rate, correlation, cross-correlation, auto-correlation, skewness, kurtosis, area, absolute area, signal magnitude mean, absolute signal magnitude mean, magnitude difference function |
Frequency | Energy, energy normalized, power, centroid, entropy, DC component, peak, coefficient sum |
Algorithm | Features | Datasets | Classification Algorithm | Distance Measure | Parameters |
---|---|---|---|---|---|
HAR-SR | 15 | SHOAIB, WISDM, UCI | K-NN (k = 3) | Cosine similarity | Data Fusion = Concatenation Symbolic = SAX |
*TF | 145 | SHOAIB, WISDM, UCI | K-NN (k = 3) | Euclidean distance | - |
SAX-VSM | 46.656 | SHOAIB, WISDM, UCI | K-NN (K = 1) | Cosine similarity | Data Fusion = Concatenation Symbolic = SAX |
BOSS-VS | 46.656 | SHOAIB, WISDM, UCI | K-NN (K = 1) | Cosine similarity | Data Fusion = Concatenation Symbolic = SAX |
Dataset | SHOAIB |
---|---|
Data Fusion Methods | Magnitude |
Sensors | Accelerometer, Gyroscope, Magnetometer |
Symbolic Methods | SAX, SFA |
Word Size | 4, 6 |
Alphabet Size | 4, 6, 8 |
Window Size | 50% (Slide Window) |
Segment Size | 2.5 s |
Word () | Alphabet () | Word Space | Interval |
---|---|---|---|
4 (a, b, c, d) | 4 (a, b, c, d) | 256 | aaaa-dddd |
4 (a, b, c, d) | 8 (a, b, c, d, e, f, g, h) | 4096 | aaaa-hhhh |
6 (a, b, c, d, e, f) | 4 (a, b, c, d) | 4096 | aaaaaa-dddddd |
6 (a, b, c, d, e, f) | 6 (a, b, c, d, e, f) | 46.656 | aaaaaa-ffffff |
8 (a, b, c, d, e, f, g, h) | 4 (a, b, c, d) | 65.536 | aaaaaaaa-dddddddd |
8 (a, b, c, d, e, f, g, h) | 8 (a, b, c, d, e, f, g, h) | 16777216 | aaaaaaaa-hhhhhhhh |
Sensor Group | |
---|---|
SG1 | Accelerometer |
SG2 | Accelerometer, Gyroscope |
SG3 | Accelerometer, Gyroscope, Magnetometer |
SG4 | Gyroscope |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bragança, H.; Colonna, J.G.; Lima, W.S.; Souto, E. A Smartphone Lightweight Method for Human Activity Recognition Based on Information Theory. Sensors 2020, 20, 1856. https://doi.org/10.3390/s20071856
Bragança H, Colonna JG, Lima WS, Souto E. A Smartphone Lightweight Method for Human Activity Recognition Based on Information Theory. Sensors. 2020; 20(7):1856. https://doi.org/10.3390/s20071856
Chicago/Turabian StyleBragança, Hendrio, Juan G. Colonna, Wesllen Sousa Lima, and Eduardo Souto. 2020. "A Smartphone Lightweight Method for Human Activity Recognition Based on Information Theory" Sensors 20, no. 7: 1856. https://doi.org/10.3390/s20071856
APA StyleBragança, H., Colonna, J. G., Lima, W. S., & Souto, E. (2020). A Smartphone Lightweight Method for Human Activity Recognition Based on Information Theory. Sensors, 20(7), 1856. https://doi.org/10.3390/s20071856