Skip to main content

Activity Recognition for Diabetic Patients Using a Smartphone


Diabetes is a disease that has to be managed through appropriate lifestyle. Technology can help with this, particularly when it is designed so that it does not impose an additional burden on the patient. This paper presents an approach that combines machine-learning and symbolic reasoning to recognise high-level lifestyle activities using sensor data obtained primarily from the patient’s smartphone. We compare five methods for machine-learning which differ in the amount of manually labelled data by the user, to investigate the trade-off between the labelling effort and recognition accuracy. In an evaluation on real-life data, the highest accuracy of 83.4 % was achieved by the MCAT method, which is capable of gradually adapting to each user.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7


  1. 1.

    Amft, O., Ambient, on-body, and implantable monitoring technologies to assess dietary behavior. Handbook of Behavior, Food and Nutrition. Springer 2011.

  2. 2.

    Commodity12, 2016.

  3. 3.

    Diabetes Atlas, 2016.

  4. 4.

    Cvetković, B., Milić, R., and Luštrek, M.: Estimating energy expenditure with multiple models using different wearable sensors. IEEE J. Biomed. Health Inf. 20(4):1081–1087, 2016.

  5. 5.

    Cvetković, B., Janko, V., and Luštrek, M., Demo abstract: Activity recognition and human energy expenditure estimation with a smartphone. In: PerCom 2015, pp. 23–27. St. Louis, USA, 2015.

  6. 6.

    Cvetković, B., Mirchevska, V., Janko, V., and Luštrek, M., Recognition of high-level activities with a smartphone. In: Adjunct Proceedings of the 2015 ACM International Joint Conference on Pervasive and Ubiquitous Computing and Proceedings of the 2015 ACM International Symposium on Wearable Computers (UbiComp/ISWC’15 Adjunct), pp. 1453–1461, 2015.

  7. 7.

    Cvetković, B., Kaluža, B., Gams, M., and Luštrek, M., Adapting activity recognition to a person with Multi-Classifier Adaptive Training. Journal of Ambient Intelligence and Smart Environments 7(2):171–185, 2015.

    Google Scholar 

  8. 8.

    Dernbach, S., Das, B., Krishnan, N. C., Thomas, B. L., and Cook, D. J., Simple and complex activity recognition through smart phones, 2012.

  9. 9.

    Foursquare API., 2016.

  10. 10.

    Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., and Witten, I. H., The WEKA data mining software: An update. SIGKDD Explorations 11(1):10–18, 2009. doi:10.1145/1656274.1656278.

  11. 11.

    Helal, A., Cook, D. J., and Schmalz, M., Smart home-based health platform for behavioral monitoring and alteration of diabetes patients. Journal of Diabetes Science and Technology 3(1):141–148, 2009.

    Article  PubMed  PubMed Central  Google Scholar 

  12. 12.

    jAudio library. (2016)

  13. 13.

    Kafalı, Ö, Bromuri, S., Sindlar, M., Van der Weide, T., Pelaez, E. A., Schaechtle, U., Alves, B., Zufferey, D., Rodriguez-Villegas, E., Schumacher, M. I., and Stathis, K., COMMODITY12: A smart e-health environment for diabetes management. Journal of Ambient Intelligence and Smart Environments 5(5):479–502, 2013. doi:10.3233/AIS-130220.

  14. 14.

    Kafalı, Ö., Alfonso, E.R., and Stathis, K., Activity Recognition for an Agent-oriented Personal Health System. Principles and Practice of Multi-Agent Systems – 17th International Conference, PRIMA 2014, Springer, 2014.

  15. 15.

    Kafalı, Ö., Schaechtle, U., and Stathis, K., Hydra: A hybrid diagnosis and monitoring architecture for diabetes. 16th IEEE International Conference on e-Health Networking, Applications and Services, Healthcom 2014, pp. 531–536. Natal-RN, Brazil, 2014.

  16. 16.

    Kowalski, R., and Sergot, M., A logic-based calculus of events. New Generation Computing 4(1):67–95, 1986.

    Article  Google Scholar 

  17. 17.

    Lara, O. D., and Labrador, M. A., A Survey on Human Activity Recognition using Wearable Sensors. IEEE Communications Surveys & Tutorials 15(3):1192–1209, 2013.

    Article  Google Scholar 

  18. 18.

    Lee, Z. S., and Cho, S. B., Activity recognition using hierarchical Hidden Markov Models on a smartphone with 3D accelerometer, pp. 460-467. Berlin Heidelberg: Hybrid Artificial Intelligent Systems, Springer, 2011.

  19. 19.

    Lin, L., Location-Based Activity Recognition. Ph.D. Dissertation University of Washington, 2006.

  20. 20.

    Luštrek, M., Cvetković, B., Mirchevska, V., Kafalı, Ö., Romero, A., and Stathis, K., Recognising lifestyle activities of diabetic patients with a smartphone. Pervasive Health 2015: Workshop on Personal Health Systems for Chronic Diseases, (PHSCD 2015).

  21. 21.

    Wang, Y., Lin, J., Annavaram, M., Jacobson, Q. A., Hong, J., Krishnamachari, B., and Sadeh, N., A framework of energy efficient mobile sensing for automatic user state recognition. In: Proceedings of the 7th International Conference on Mobile Systems, Applications, and Services, pp. 179–192. ACM, New York, USA, 2009.

Download references


This paper significantly extends the work of Luštrek et al. [20], which was presented in the PHSCD 2015 Workshop. The work was partially supported by the EU FP7 project COMMODITY12 (

Author information



Corresponding author

Correspondence to Božidara Cvetković.

Additional information

This article is part of the Topical Collection on Mobile Systems.

Electronic supplementary material

Below is the link to the electronic supplementary material.

(PDF 419 KB)

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Cvetković, B., Janko, V., Romero, A.E. et al. Activity Recognition for Diabetic Patients Using a Smartphone. J Med Syst 40, 256 (2016).

Download citation


  • Activity recognition
  • Smartphone
  • Lifestyle
  • Diabetes