Skip to main content

Advertisement

Log in

A Scalable Smartwatch-Based Medication Intake Detection System Using Distributed Machine Learning

  • Mobile & Wireless Health
  • Published:
Journal of Medical Systems Aims and scope Submit manuscript

Abstract

Poor Medication adherence causes significant economic impact resulting in hospital readmission, hospital visits and other healthcare costs. The authors developed a smartwatch application and a cloud based data pipeline for developing a user-friendly medication intake monitoring system that can contribute to improving medication adherence. The developed Android smartwatch application collects activity sensor data using accelerometer and gyroscope. The cloud-based data pipeline includes distributed data storage, distributed database management system and distributed computing frameworks in order to build a machine learning model which identifies activity types using sensor data. With the proposed sensor data extraction, preprocessing and machine learning algorithms, this study successfully achieved a high F1 score of 0.977 with 13.313 seconds of training time and 0.139 seconds for testing.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

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

Similar content being viewed by others

References

  1. Amazon Web Service Amazon (2019) https://aws.amazon.com

  2. Aldeer M., Javanmard M., Martin R.P.: A review of medication adherence monitoring technologies. Appl. Syst. Innov. 1(2):14, 2018

    Article  Google Scholar 

  3. Amazon Web Services Amazon s3 (2019) https://aws.amazon.com/s3/

  4. Apache Spark Apache spark: Lightning-fast cluster computing (2019) http://spark.apache.org

  5. Apache Spark Apache spark: Lightning-fast cluster computing (2019) http://spark.apache.org

  6. Berzati B., Ippisch A., Graffi K.: An android wear os framework for sensor data and network interfaces.. In: 2018 IEEE 43rd Conference on Local Computer Networks Workshops (LCN Workshops). IEEE, 2018, pp 98–104

  7. Breiman L.: Random forests. Mach. Learn. 45(1):5–32, 2001

    Article  Google Scholar 

  8. Brown M.T., Bussell J., Dutta S., Davis K., Strong S., Mathew S.: Medication adherence: Truth and consequences. Am. J. Med. Sci. 351(4):387–399, 2016

    Article  Google Scholar 

  9. Bruce P., Bruce A (2017) Practical statistics for data scientists: 50 essential concepts. O’Reilly Media Inc.

  10. Chaczko Z., Mahadevan V., Aslanzadeh S., Mcdermid C.: Availability and load balancing in cloud computing.. In: International Conference on Computer and Software Modeling, vol 14, Singapore, 2011

  11. Chang F., Dean J., Ghemawat S., Hsieh W.C., Wallach D.A., Burrows M., Chandra T., Fikes A., Gruber R.E.: Bigtable: A distributed storage system for structured data. ACM Trans. Comput. Syst. (TOCS) 26(2):4, 2008

    Article  Google Scholar 

  12. Chen C., Kehtarnavaz N., Jafari R.: A medication adherence monitoring system for pill bottles based on a wearable inertial sensor.. In: 2014 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE, 2014, pp 4983–4986

  13. Chieu T.C., Mohindra A., Karve A.A., Segal A.: Dynamic scaling of web applications in a virtualized cloud computing environment.. In: 2009 IEEE International Conference on e-Business Engineering. IEEE, 2009, pp 281–286

  14. Cramer J.S.: The origins and development of the logit model. Logit Models Econ. Fields 2003:1–19, 2003

    Google Scholar 

  15. Dean J., Ghemawat S.: Mapreduce: Simplified data processing on large clusters. Commun. ACM 51(1):107–113, 2008

    Article  Google Scholar 

  16. DeCandia G., Hastorun D., Jampani M., Kakulapati G., Lakshman A., Pilchin A., Sivasubramanian S., Vosshall P., Vogels W.: Dynamo: Amazon’s highly available key-value store.. In: ACM SIGOPS Operating Systems Review, vol 41. ACM, 2007, pp 205–220

  17. Dorman K., Yahyanejad M., Nahapetian A., Suh M.k., Sarrafzadeh M., McCarthy W., Kaiser W.: Nutrition monitor: A food purchase and consumption monitoring mobile system.. In: International Conference on Mobile Computing, Applications, and Services. Springer, 2009, pp 1–11

  18. Furht B., Escalante A. (2010) Handbook of Cloud Computing, Vol. 3. Springer

  19. Gu L., Li H.: Memory or time: Performance evaluation for iterative operation on hadoop and spark.. In: 2013 IEEE 10th International Conference on High Performance Computing and Communications & 2013 IEEE International Conference on Embedded and Ubiquitous Computing (HPCC_EUC). IEEE, 2013, pp 721–727

  20. Hansen R.A., Kim M.M., Song L., Tu W., Wu J., Murray M.D.: Adherence: Comparison of methods to assess medication adherence and classify nonadherence. Ann. Pharmacotherap. 43(3):413–422, 2009

    Article  Google Scholar 

  21. Hasanuzzaman F.M., Yang X., Tian Y., Liu Q., Capezuti E.: Monitoring activity of taking medicine by incorporating rfid and video analysis. Network Modeling Analysis in Health Informatics and Bioinformatics 2(2):61–70, 2013

    Article  Google Scholar 

  22. Hayes T.L., Hunt J.M., Adami A., Kaye J.A.: An electronic pillbox for continuous monitoring of medication adherence.. In: 2006 International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE, 2006, pp 6400–6403

  23. Haynes R.B., McDonald H.P., Garg A.X.: Helping patients follow prescribed treatment: Clinical applications. Jama 288(22):2880–2883, 2002

    Article  Google Scholar 

  24. Helitzer D., Heath D., Maltrud K., Sullivan E., Alverson D.: Assessing or predicting adoption of telehealth using the diffusion of innovations theory: a practical example from a rural program in new mexico. Telemedicine J. e-health 9(2):179–187, 2003

    Article  Google Scholar 

  25. Hezarjaribi N., Fallahzadeh R., Ghasemzadeh H.: A machine learning approach for medication adherence monitoring using body-worn sensors.. In: Proceedings of the 2016 Conference on Design, Automation & Test in Europe. EDA Consortium, 2016, pp 842–845

  26. Ho A. (2015) Step-by-step android wear application development. Amazon Digital Services

  27. Howard A., Lee T., Mahar S., Intrevado P., Woodbridge D.: Distributed data analytics framework for smart transportation.. In: 2018 IEEE 20th International Conference on High Performance Computing and Communications; IEEE 16th International Conference on Smart City; IEEE 4th International Conference on Data Science and Systems (HPCC/SmartCity/DSS). IEEE, 2018, pp 1374–1380

  28. Huang J.C.: Remote health monitoring adoption model based on artificial neural networks. Expert Syst. Appl. 37(1):307–314, 2010

    Article  Google Scholar 

  29. Insel K.C., Cole L.: Individualizing memory strategies to improve medication adherence. Appl. Nurs. Res. 18(4):199–204, 2005

    Article  Google Scholar 

  30. Kalantarian H., Alshurafa N., Sarrafzadeh M.: Detection of gestures associated with medication adherence using smartwatch-based inertial sensors. IEEE Sensors J. 16:1054–1061, 2016

    Article  Google Scholar 

  31. Kalantarian H., Motamed B., Alshurafa N., Sarrafzadeh M.: A wearable sensor system for medication adherence prediction. Artif. Intell. Med. 69:43–52, 2016

    Article  Google Scholar 

  32. Laptev I., Caputo B., et al.: Recognizing human actions: A local svm approach.. In: null. IEEE, 2004, pp 32–36

  33. Ma J., Ovalle A., Woodbridge D.M.k.: Medhere: A smartwatch-based medication adherence monitoring system using machine learning and distributed computing.. In: 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC). IEEE, 2018, pp 4945–4948

  34. Mason L., Baxter J., Bartlett P.L., Frean M.R.: Boosting algorithms as gradient descent.. In: Advances in Neural Information Processing Systems, 2000, pp 512–518

  35. MongoDB Mongodb for giant ideas (2019) https://www.mongodb.com/

  36. Morisky D.E. (2008) Predictive validity of a medication adherence measure for hypertension control

  37. Neter J., Kutner M.H., Nachtsheim C.J., Wasserman W. (1996) Applied Linear Statistical Models, Vol. 4. Irwin Chicago

  38. Osterberg L., Blaschke T.: Adherence to medication. New England J. Med. 353(5):487–497, 2005

    Article  CAS  Google Scholar 

  39. Pop-Eleches C., Thirumurthy H., Habyarimana J.P., Zivin J.G., Goldstein M.P., De Walque D., Mackeen L., Haberer J., Kimaiyo S., Sidle J., et al: Mobile phone technologies improve adherence to antiretroviral treatment in a resource-limited setting: a randomized controlled trial of text message reminders. AIDS (London England) 25(6):825, 2011

    Article  Google Scholar 

  40. ur Rehman M.H., Liew C.S., Wah T.Y., Khan M.K.: Towards next-generation heterogeneous mobile data stream mining applications: Opportunities, challenges, and future research directions. J. Netw. Comput. Appl. 79:1–24, 2017

    Article  Google Scholar 

  41. Safavian S.R., Landgrebe D.: A survey of decision tree classifier methodology. IEEE Trans. Syst. Man Cybern. 21(3):660–674, 1991

    Article  Google Scholar 

  42. Salzman C. (1995) Medication compliance in the elderly The Journal of clinical psychiatry

  43. Sansone R.A., Sansone L.A.: Antidepressant adherence: Are patients taking their medications? Innov. Clin. Neurosci. 9(5–6):41, 2012

    PubMed  PubMed Central  Google Scholar 

  44. Seto E.: Cost comparison between telemonitoring and usual care of heart failure: A systematic review. Telemedicine and e-Health 14(7):679–686, 2008

    Article  Google Scholar 

  45. Shea S., Weinstock R.S., Starren J., Teresi J., Palmas W., Field L., Morin P., Goland R., Izquierdo R.E., Wolff L.T., et al: A randomized trial comparing telemedicine case management with usual care in older, ethnically diverse, medically underserved patients with diabetes mellitus. J. Am. Med. Inform. Assoc. 13(1):40–51, 2006

    Article  Google Scholar 

  46. Sokol M.C., McGuigan K.A., Verbrugge R.R., Epstein R.S. (2005) Impact of medication adherence on hospitalization risk and healthcare cost. Medical Care, 521–530

  47. Speier C., Frese M.: Generalized self efficacy as a mediator and moderator between control and complexity at work and personal initiative: A longitudinal field study in east germany. Human Perform. 10(2):171–192, 1997

    Article  Google Scholar 

  48. Suh M.k., Chen C.A., Woodbridge J., Tu M.K., Kim J.I., Nahapetian A., Evangelista L.S., Sarrafzadeh M.: A remote patient monitoring system for congestive heart failure. J. Med. Syst. 35(5):1165–1179, 2011

    Article  Google Scholar 

  49. Suh M.k., Evangelista L.S., Chen C.A., Han K., Kang J., Tu M.K., Chen V., Nahapetian A., Sarrafzadeh M.: An automated vital sign monitoring system for congestive heart failure patients.. In: Proceedings of the 1st ACM International Health Informatics Symposium. ACM, 2010, pp 108–117

  50. Suh M.k., Moin T., Woodbridge J., Lan M., Ghasemzadeh H., Bui A., Ahmadi S., Sarrafzadeh M.: Dynamic self-adaptive remote health monitoring system for diabetics.. In: 2012 Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE, 2012, pp 2223–2226

  51. Suykens J.A., Vandewalle J.: Least squares support vector machine classifiers. Neur. Process. Lett. 9(3):293–300, 1999

    Article  Google Scholar 

  52. Tucker C.S., Behoora I., Nembhard H.B., Lewis M., Sterling N.W., Huang X.: Machine learning classification of medication adherence in patients with movement disorders using non-wearable sensors. Comput. Biol. Med. 66:120–134 , 2015

    Article  Google Scholar 

  53. Vlasnik J.J., Aliotta S.L., DeLor B.: Medication adherence: Factors influencing compliance with prescribed medication plans. Case Manager 16(2):47–51, 2005

    Article  Google Scholar 

  54. Webb G.I., Hyde R., Cao H., Nguyen H.L., Petitjean F.: Characterizing concept drift. Data Min. Knowl. Disc. 30(4):964–994, 2016

    Article  Google Scholar 

  55. Wu J.H., Wang S.C., Lin L.M.: Mobile computing acceptance factors in the healthcare industry: A structural equation model. Int. J. Med. Inform. 76(1):66–77, 2007

    Article  Google Scholar 

  56. Zaharia M., Chowdhury M., Franklin M.J., Shenker S., Stoica I.: Spark: Cluster computing with working sets. HotCloud 10(10-10):95, 2010

    Google Scholar 

  57. Zissis D., Lekkas D.: Addressing cloud computing security issues. Fut. Gen. Comput. Syst. 28(3): 583–592, 2012

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by Jesuit Foundation Grant, University of San Francisco Faculty Development Fund, and Systers Pass-it-on Award by Anita Borg Institute for Women and Technology. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the funding organizations.

Funding

This work was funded by 1) Spring 2017 Jesuit Foundation Grant, 2) University of San Francisco Faculty Development Fund, and 3) 2018 Systers Pass-it-on Award by Anita Borg Institute for Women and Technology.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Diane Myung-kyung Woodbridge.

Ethics declarations

Conflict of interests

Diane Woodbridge has received research grants from Jesuit Foundation, University of San Francisco and Anita Borg Institute and has no conflict of interest.

Ethical approval

All procedures performed in studies involving human participants were in accordance with University of San Francisco, Institutional Review Board (IRB) for the Protection of Human Subjects.

Informed Consent

Informed consent was obtained from all individual participants included in the study.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article belongs to the Topical Collection Mobile & Wireless Health

Donya Fozoonmayeh, Hai Vu Le and Ekaterina Wittfoth have contributed equally.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Fozoonmayeh, D., Le, H.V., Wittfoth, E. et al. A Scalable Smartwatch-Based Medication Intake Detection System Using Distributed Machine Learning. J Med Syst 44, 76 (2020). https://doi.org/10.1007/s10916-019-1518-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10916-019-1518-8

Keywords

Navigation