I'm trying to predict what a user might eat next give history of a user's food logs and a users demographic data.

The data that I have for each user is:

  • Food logs (Where users track what foods they eat throughout the day)
  • Ethnicity
  • Location (City, Country)
  • Gender
  • Age

Using this data, since food logs is a time series dataset the first thing that comes to mind is using something like an LSTM, but I'm not sure how the rest could factor in. Another option is creating buckets of users using rest of the data and then applying a time series model to the users in each bucket, but in this case each model might not have enough data to train to a good accuracy. Is there some model that can combine both types of data? If not, what would be your approach to solve this problem?

  • $\begingroup$ Keep It simple. People eat breakfast lunch dinner. and possibly different on weekends. no timeseries necessary. just add those as features. $\endgroup$
    – seanv507
    Oct 6, 2021 at 20:51
  • $\begingroup$ Wow, that is actually something that I did not think of for some reason. Thank you, it's definitely a good option. So how would you go about scaling a model for millions of users in that case? $\endgroup$ Oct 7, 2021 at 13:46
  • $\begingroup$ How long are the series for each user? How many different categories of food? Maybe you could organize food in a hierarchy, and then predictions could be <done on different levels in the hierarchy ? $\endgroup$ Oct 7, 2021 at 18:25

1 Answer 1


Might want to stratify the data based on those demographic variables to find a small set of "food patterns," simple frequency distributions of food. Once the patterns are selected, re-stratify by pattern. Combine the subject logs within each pattern to estimate a Markov chain of meal choices. Voila! one-ahead meal predictions. Given enough data, you can tweak to make two-ahead predictions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.