2. by Georges Duverger
  3. Last month, I talked at the NY Quantified Self Meetup about how I replaced calorie counting with a machine learning algorithm that learns about my diet over time. This is a recording of the presentation, along with an edited transcript.

  4. I have been tracking what I eat for almost 2 years. A little bit on and off. I logged more than 400 days so far. This is about 3,000 entries:
  5. Scatter plot of entries
  6. And this is what it looks like:
  7. Messages
  8. I am also keeping track of my weight. It is all free-form, and I am using my own words to describe what I am eating. I initially started this to lose weight--and I did! This is my weight fluctuation:
  9. Scatter plot of weights
  10. I lost weight; then I gained it back; then I lost it again... After a while, I got discouraged and realized that I should instead focus on gaining knowledge about my overall nutrition in order to improve my health long term.

  11. At the beginning, when I was just trying to lose weight, I did what most people do: I started to count calories. I used a very low-key solution; I emailed myself what I ate.
  12. Old email
  13. Later that day, I would search for the number of calories in various databases. It worked pretty well, but I wasn’t able to keep doing it for a long period of time. It wasn’t sustainable, so I outsourced it.
  14. I sent all those messges to Mechanical Turk. (For those who don’t know, Mechanical Turk is an online service that lets you hire workers for very small and specific tasks.) It was extremely simple--for me--but it wasn’t accurate enough.
  15. Mechanical Turk
  16. This is a logarithm scale. If you imagine a linear one, those plots are all over the place. That is when I decided to stop counting calories.

  17. Here is what I am doing now. I am using the simplest, most basic entry mechanism that I could find on my phone: the text messaging app.
  18. Text messages
  19. I send everything I eat to a number I own. I also send my weight. And then, I forget about it. On the back-end, I made a program that analyzes those messages and weights and tries to find correlations between the two.
  20. Machine learning regression
  21. The service then sends me a daily email, based on those correlations, before I wake up. It looks like this:
  22. Email
  23. The top part is a food diary with everything I ate the day before. It highlights the positive and negative correlations that those meals had on my weight. Right now, the goal is set on weight loss but it could as easily be the opposite--I figured I would start with the most common use case.
  24. The bottom part breaks down what I had over the last 7 days and puts it into categories. It makes it easier for me to track. For example, if I want to eat more fruit or cut alcoholic beverages, it could help me get there.
  25. In conclusion, I learned that calorie counting works on me for a short period of time but I am not getting a lot of nutritional insights out of it to improve my health long term. The data-driven service I made will hopefully fix that.

  26. Since that talk, I have been testing a beta version of the service. (Thank you, Annie, Ricky, Benny, John, Bridget, Madeline, Peter, Antoine, Richard, Nick, Niru, Tim, Vicky, Robert... for your help and patience!) I am currently working on a 2nd iteration based on all the great feedback I received, and I can't wait to share it with more quantified self enthusiasts.
  27. As always, I would love to hear what you think. Please, send me an email and let me know.

  28. Made in Arlington, MA. Generated with Ivy. Styled with Backslash. All emojis designed by OpenMoji – the open-source emoji and icon project. License: CC BY-SA 4.0