Application of Machine Learning to Predict Dietary Lapses During Weight Loss

J Diabetes Sci Technol. 2018 Sep;12(5):1045-1052. doi: 10.1177/1932296818775757. Epub 2018 May 24.


Background: Individuals who adhere to dietary guidelines provided during weight loss interventions tend to be more successful with weight control. Any deviation from dietary guidelines can be referred to as a "lapse." There is a growing body of research showing that lapses are predictable using a variety of physiological, environmental, and psychological indicators. With recent technological advancements, it may be possible to assess these triggers and predict dietary lapses in real time. The current study sought to use machine learning techniques to predict lapses and evaluate the utility of combining both group- and individual-level data to enhance lapse prediction.

Methods: The current study trained and tested a machine learning algorithm capable of predicting dietary lapses from a behavioral weight loss program among adults with overweight/obesity (n = 12). Participants were asked to follow a weight control diet for 6 weeks and complete ecological momentary assessment (EMA; repeated brief surveys delivered via smartphone) regarding dietary lapses and relevant triggers.

Results: WEKA decision trees were used to predict lapses with an accuracy of 0.72 for the group of participants. However, generalization of the group algorithm to each individual was poor, and as such, group- and individual-level data were combined to improve prediction. The findings suggest that 4 weeks of individual data collection is recommended to attain optimal model performance.

Conclusions: The predictive algorithm could be utilized to provide in-the-moment interventions to prevent dietary lapses and therefore enhance weight losses. Furthermore, methods in the current study could be translated to other types of health behavior lapses.

Keywords: diet; ecological momentary assessment; machine learning; obesity.

Publication types

  • Clinical Trial
  • Research Support, Non-U.S. Gov't

MeSH terms

  • Adult
  • Algorithms*
  • Diet, Reducing / methods*
  • Ecological Momentary Assessment
  • Female
  • Humans
  • Machine Learning*
  • Male
  • Mobile Applications
  • Obesity / diet therapy
  • Overweight / diet therapy*
  • Patient Compliance*
  • Smartphone
  • Weight Reduction Programs / methods