A new approach based on temporal sub-windows for online sensor-based activity recognition

  • Macarena Espinilla
  • Javier Medina
  • Josef Hallberg
  • Chris Nugent
Original Research


Usually, approaches driven by data proposed in literature for sensor-based activity recognition use the begin label and the end label of each activity in the dataset, fixing a temporal window with sensor data events to identify the activity carried out in this window. This type of approach cannot be carried out in real time because it is not possible to predict the start time of an activity, i.e., the class of the future activity that an inhabitant will perform, neither when he/she will begin to carry out this activity. However, an activity can be marked as finished in real time only with the previous observations. Therefore, there is a need of online activity recognition approaches that classify activities using only the end label of the activity. In this paper, we propose and evaluate a new approach for online activity recognition with three temporal sub-windows that uses only the end label of the activity. The advantage of our approach is that the temporal sub-windows keep a partial order in the sensor data stream from the end time of the activity in a short-term, medium-term, long-term. The experiments conducted to evaluate our approach suggest the importance of the use of temporal sub-windows versus a single temporal window in terms of accuracy, using only the end time of the activity. The use of temporal sub-windows has improved the accuracy in the 98.95% of experiments carried out.


Activity recognition Data sensor stream Fuzzy linguistic modelling Sensor data stream processing Smart environments 



This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie Grant agreement No 734355 together the Spanish government by research project TIN2015-66524-P.


  1. Alemdar H, Ersoy C (2017) Multi-resident activity tracking and recognition in smart environments. J Ambient Intell Humaniz Comput 8(4):513–529. CrossRefGoogle Scholar
  2. Banos O, Galvez J-M, Damas M, Pomares H, Rojas I (2014) Window size impact in human activity recognition. Sensors (Basel Switzerland) 14(4):6474–6499. CrossRefGoogle Scholar
  3. Bengio Y (2009) Learning deep architectures for AI. Found Trends Mach Learn 2(1):1–27. CrossRefzbMATHGoogle Scholar
  4. Calvaresi D, Cesarini D, Sernani P et al (2017) J Ambient Intell Human Comput 8:239. CrossRefGoogle Scholar
  5. Carnevali L, Nugent C, Patara F, Vicario E (2015) A continuous-time model-based approach to activity recognition for ambient assisted living. In: Campos J, Haverkort B (eds) Quantitative evaluation of systems. QEST 2015. Lecture notes in computer science, vol 9259. Springer, Cham. Google Scholar
  6. Chan T-H, Jia K, Gao S, Lu J, Zeng Z, Ma Y (2015) PCANet: a simple deep learning baseline for image classification? IEEE Trans Image Process 24(12):5017–5032. MathSciNetCrossRefGoogle Scholar
  7. Chen L, Nugent C (2009) Ontology-based activity recognition in intelligent pervasive environments. Int J Web Inf Syst 5:410–430. CrossRefGoogle Scholar
  8. Chen L, Nugent C, Wang H (2012) A knowledge-driven approach to activity recognition in smart homes. IEEE Trans Knowl Data Eng 24:961–974. CrossRefGoogle Scholar
  9. Chen B, Fan Z, Cao F (2015) Activity recognition based on streaming sensor data for assisted living in smart homes. In: Intelligent Environments (IE), 2015 International Conference, pp 124–127.
  10. Cook DJ (2010). Learning setting-generalized activity models for smart spaces. IEEE Intell Syst. Google Scholar
  11. Dietterich TG (2002) Machine learning for sequential data: a review. In: Caelli T, Amin A, Duin R.P.W., de Ridder D, Kamel M (eds) Structural, syntactic, and statistical pattern recognition. SSPR /SPR 2002. Lecture notes in computer science, vol 2396. Springer, BerlinGoogle Scholar
  12. Espinilla M, Medina J, Calzada A, Liu J, Martínez L, Nugent C (2017) Optimizing the configuration of and heterogeneous architecture of sensors for activity recognition, using the extended belief rule-based inference methodology. Microprocess Microsyst 52:381–390. CrossRefGoogle Scholar
  13. Gu T, Wang L, Wu Z, Tao X, Lu J (2011) A pattern mining approach to sensor-based human activity recognition. IEEE Trans Knowl Data Eng 23:1359–1372. CrossRefGoogle Scholar
  14. Gutiérrez López de la Franca, C, Hervás R, Johnson E, Mondéjar T, Bravo J (2017) Extended Body-Angles Algorithm to recognize activities within intelligent environments. J Ambient Intell Humaniz Comput 8(4):531–549. CrossRefGoogle Scholar
  15. John GH, Langley P, (1995) Estimating continuous distributions in Bayesian classifiers. In: Eleventh Conference on Uncertainty in Artificial Intelligence, pp 338–345Google Scholar
  16. Junker H, Amft O, Lukowicz P, Traster G (2008) Gesture spotting with body-worn inertial sensors to detect user activities. Pattern Recogn 41:2010–2024. CrossRefzbMATHGoogle Scholar
  17. Keerthi SS, Shevade SK, Bhattacharyya C, Murthy KRK (2001) Improvements to Platt’s SMO algorithm for SVM classifier design. Neural Comput 13(3):637–649. CrossRefzbMATHGoogle Scholar
  18. Krishnan NC, Cook DJ (2014) Activity recognition on streaming sensor data. Pervasive Mobile Comput 10:138–154. CrossRefGoogle Scholar
  19. Krüger F, Nyolt M, Yordanova K, Hein A, Kirste T (2014) Computational state space models for activity and intention recognition. A feasibility study. PLoS ONE 9(11):e109381. CrossRefGoogle Scholar
  20. Li C, Lin M, Yang L, Ding C (2014) Integrating the enriched feature with machine learning algorithms for human movement and fall detection. J Supercomput 67:854–865. CrossRefGoogle Scholar
  21. López G, Marín G, Calderón M (2017) Human aspects of ubiquitous computing: a study addressing willingness to use it and privacy issues. J Ambient Intell Humaniz Comput 8(4):497–511. CrossRefGoogle Scholar
  22. Nugent C, Synnott J, Santanna A, Espinilla M et al. (2016). An initiative for the creation of open datasets within the pervasive healthcare. In: 10th EAI International Conference on Pervasive Computing Technologies for Healthcare, Cancun, Mexico, 16–19 May 2016, pp 180–183.
  23. Ordoñez F, de Toledo P, Sanchis A (2013) Activity recognition using hybrid generative/discriminative models on home environments using binary sensors. Sensors (Switzerland) 13:5460–5477. CrossRefGoogle Scholar
  24. Ordóñez FJ, Iglesias JA, De Toledo P, Ledezma A, Sanchis A (2013) Online activity recognition using evolving classifiers. Expert Syst Appl 40(4):1248–1255. CrossRefGoogle Scholar
  25. Quesada FJ, Moya F, Medina J, Martínez L, Nugent C, Espinilla M (2015) Generation of a partitioned dataset with single, interleave and multioccupancy daily living activities. In: García-Chamizo J, Fortino G, Ochoa S (eds) Ubiquitous computing and ambient intelligence. sensing, processing, and using environmental information. Lecture notes in computer science, vol 9454. Springer, Cham, pp. 60–71. Google Scholar
  26. Quinlan R (1993) 4.5: programs for machine learning. Morgan Kaufmann Publishers, BurlingtonGoogle Scholar
  27. San Mateo CA, San Martin L, Pelaez V, Gonzalez R, Campos A, Lobato V (2010) Environmental user-preference learning for smart homes: an autonomous approach. J Ambient Intell Smart Environ 2:327–342Google Scholar
  28. Schmitter-Edgecombe D, Crandall AM, Sanders C, Thomas B (2009) Collecting and disseminating smart home sensor data in the CASAS project. In: Proceedings of the CHI Workshop on Developing Shared Home Behavior Datasets to Advance HCI and Ubiquitous Computing ResearchGoogle Scholar
  29. Tapia EM, Intille SS, Larson K (2004) Activity recognition in the home using simple and ubiquitous sensors. In: Ferscha A, Mattern F (eds) Pervasive computing. Pervasive 2004. Lecture notes in computer science, vol 3001. Springer, Berlin. Google Scholar
  30. Triboan D, Chen L, Chen F, Wang Z (2017) Semantic segmentation of real-time sensor data stream for complex activity recognition. Personal Ubiquitous Comput 21(3):411–425. CrossRefGoogle Scholar
  31. Van Kasteren T, Noulas A, Englebienne G, Krose B (2008) Accurate activity recognition in a home setting. In: Proceedings of the 10th International Conference on Ubiquitous Computing, pp 1–9.
  32. Wang L, Gu T, Tao X, Lu J (2012) A hierarchical approach to real-time activity recognition in body sensor networks. Pervasive Mobile Comput 8:115–130. CrossRefGoogle Scholar
  33. Wang J, Chen Y, Hao S, Peng X, Hu L (2017) Deep learning for sensor-based activity recognition: a survey. ArXiv e-print. arXiv:1707.03502v2Google Scholar
  34. Yala N, Fergani B, Fleury A (2017) Towards improving feature extraction and classification for activity recognition on streaming data. J Ambient Intell Humaniz Comput 8(2):177–189. CrossRefGoogle Scholar
  35. Zhang T, Fu W, Ye J, Fischer M (2017) Learning movement patterns of the occupant in smart home environments: an unsupervised learning approach. J Ambient Intell Humaniz Comput 8(1):133–146. CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2018

Authors and Affiliations

  • Macarena Espinilla
    • 1
  • Javier Medina
    • 1
  • Josef Hallberg
    • 2
  • Chris Nugent
    • 3
  1. 1.Department of Computer ScienceUniversity of JaénJaénSpain
  2. 2.Department of Computer ScienceLulea tekniska UniversitetLuleåSweden
  3. 3.School of Computing and MathematicsUlster UniversityColeraineUK

Personalised recommendations