Live data from Hacker News

Machine Learning and Ketosis

github.com

21–30 of 309 posts

Re: Machine Learning and Ketosis

#21
I appreciate that the author shared his data because it's interesting to compare notes. I embarked on a strict ketogenic diet in 2012 from a significantly higher initial weight and observed a very different pattern of weight loss: https://i.imgur.com/mOt6P.png

I hit a loss plateau around 180 lbs that I couldn't break through until I began eating on an 8-16 fasting schedule like Ariel mentions in his "Further progress" section.

I gave up on the diet during 2015 and have since regained a significant amount of weight, but I suppose that's just an opportunity to apply some of the tracking techniques in this article to my next foray.

Re: Machine Learning and Ketosis

#22
post #9

Very interesting littlw study. The results seem to make sense, and I'm impressed that his model can learn what causes his weight swings given the low resolution delta-weight data he collects. The author uses vowpal-wabbit to train his regression model. Anybody know what learning algorithm it uses (eg random forest?) Here's the link: https://github.com/JohnLangford/vowpal_wabbit/wiki

Thanks mbrundle. I'm the person behind that git repository and honestly am in a bit of a shock that this is making hacker-news.

As I say in the README.md: please ignore the noise, the scales I used had 0.2 pound resolution, and my data-set was too small (and as one snarky commenter noticed, some words were misspelled). What is important is the big picture. There are actually numerous contradictions and irregularities in the data. In particular, any food item that appears only once or twice in the data-set, and is randomly coinciding with other features that make it biased the wrong way contributes to the error of the model.

So as I say in the README, I would ignore anything that's not near the top or bottom, and even those should be taken with a healthy dose of (noise/modeling) skepticism.

Anyway, the code is free for everyone to use so people are encouraged to run the experiment on themselves using more accurate methods and contributing more data. It only requires R+ggplot2 and vowpal wabbit. Cheers.

Re: Machine Learning and Ketosis

#23
post #15

It's astonishing (and really awesome) that they were able to extract such a strong signal from daily weight swings! This makes me a lot more optimistic about the possibilities of quantified-self-type stuff. Three things I'm really curious about: - How significant are the estimates of lifestyle factors? Do you have p-values? If you bootstrap resample, how much do the rankings change at the extremes? - How much cogniti…

> - How significant are the estimates of lifestyle factors? Do you have p-values? If you bootstrap resample, how much do the rankings change at the extremes?

His VW script does do bootstrapping ('--bootstrap 16') but he doesn't report it anywhere I see. https://github.com/JohnLangford/vowpal_wabbit/wiki/using-vw-... seems to not report any sort of p-value or confidence interval which might be derived from the bootstrapping. (The 'relevance' is 'the relative distance of each variable from the best constant prediction', not sure what that means.)

So if you want to know, it looks like you'll have to run it yourself and visualize the output. I would guess that the uncertainties are huge and none of them reach even p<0.05 - it simply should not be possible to get mean loss of like 0.2 and reliable estimates of hundreds of variables like 'melon' out of less than 4 months of data when the random measurement error of the scale itself is on the order of half a pound (I have an Omron body fat scale, and even taking 2-3 measurements daily, there's a lot of error) unless his VW regression is grossly overfitting.

Re: Machine Learning and Ketosis

#26

This matches my experience of weight loss using high fat diet. I started it after hearing Sarah Hallberg's Tedx talk. https://www.youtube.com/watch?v=da1vvigy5tQ&feature=youtu.be For a vegetarian, starting and continuing the high fat low carb diet is difficult. Are there any resources for more vegetarian recipes for high fat low carb food? The article was very impressive. I liked the graphs and presentation.

Many of these meals are vegetarian - it may be good inspiration: http://eatingacademy.com/personal/actually-eat-part-iii-circ... http://eatingacademy.com/nutrition/what-i-actually-eat http://eatingacademy.com/personal/what-i-actually-eat-part-i...

thanks for the pointers. will check them out.

Re: Machine Learning and Ketosis

#27
post #3

This is all good if your goal is weight loss. However weight loss doesn't necessarily means higher fitness. Glycogen is fundamental if you do sports, and exercise is a major ingredient in getting fit. If I read correctly, exercise was not a big part of your experiment, how would you suggest modifying the experiment to accommodate one's exercising needs? On a side note, I reached a similar conclusion on the role of "c…

I can give a personal anecdote.

About 3 years ago I began experiments with paleo, I am 5'6-5'7 started over 190lbs and in about 4 months was down to 152lbs. Weekends I would have cheat meals usually a pizza day and burger/fry day.

Around then I began running for the first time in my life. I started out the first 3 months at 1 mile everyday, which I thought was a lot until a high school buddy laughed when I told him.

I stopped eating paleo and increased to 3 miles about 5 times a week. This went on for about a month, when I decided to register for a half marathon and started a basic 12 week training. I tried to restart paleo, but about a month in my legs began to hurt which I attributed to lack of carbs so I again got off. During Summer in Miami I decreased the mileage due to the heat and would get back on paleo still weekend cheat days.

During any of that time I didn't know about Ketosis or I never experienced anything I would call Ketosis.

Fast forward to this year, I completed the Disney Goofy (half day1, full day2), then another 2 halfs during the spring. I was back to about 170, and despite running more mileage than I ever had, I was not pleased with my physique, feeling I looked better even at the same weight while on paleo. So I decided after my last half of the season, I would try to go full paleo without any cheat meals on the weekend with the goal of 5 mile runs 4-5 times per week. I just completed a half the weekend before and Tuesday I did my 5 mile on paleo and felt fine/normal.

Wednesday/Thursday during my runs I got light head and basically though I might blackout, never experienced that before, but I stuck with it. Then by the 3rd week, I honestly felt I was tapping into a different energy source, not that I was running faster but it was just a different feeling and it was amazing.

Despite having combined paleo and running before, my body had never responded like this before. Having read up on high endurance athletes who do paleo after the fact, I believe what was happening is my body was tapping into and burning fat as its main source of energy and I also learned about Ketosis at that time (I believe/understand these to be one in the same, but they may not be). I will note, even my mind seemed different as I began to really think/feel that sugars were a poison and I was disgusted by the thought of breads/sugars, meaning I didn't even want cheat days on the weekend. This lasted for about 2 months without a cheat day and eventually there was a craving for carbs and I had no hesitation about giving in, so I am back off the paleo, and basically the very next run my body was not performing the same as it was. I look forward to implementing a strict paleo diet again without cheat days when the weather cools and I will try to build my mileage up in that state for the next running season.

Re: Machine Learning and Ketosis

#28
If anybody is reading this and curious about Ketosis, I'd recommend Taubes book (https://www.amazon.com/Why-We-Get-Fat-About/dp/0307474259). It's a great review of scientific studies done over the years.

I read that 4 years ago, spent another 4 months reading the listed studies, convinced myself it was a good plan, and lost 40 pounds with no exercises. I still do LCHF after all these years, and likely will never go back to a traditional diet, it feels great.

Re: Machine Learning and Ketosis

#29
post #3

This is all good if your goal is weight loss. However weight loss doesn't necessarily means higher fitness. Glycogen is fundamental if you do sports, and exercise is a major ingredient in getting fit. If I read correctly, exercise was not a big part of your experiment, how would you suggest modifying the experiment to accommodate one's exercising needs? On a side note, I reached a similar conclusion on the role of "c…

I'm in ketosis. I can tell when the glycogen in my liver depletes. I hit a wall and can't keep going. I find that it has to do with intensity - for low intensity exercise, I can go forever. When I have to exert more (like running up an SF hill), it depletes me more. To fix this, you more or less have to keep intensity lower. I think that's why it works well for bicyclists who can change gears. Good news is that, afte…

Have you keto-adapted?

Re: Machine Learning and Ketosis

#30

He advocates a book "The Truth About Statins". Is it helpful info on evidence based science or mostly zealotry and soapboxing?

I haven't read the book itself, but Roberts' has a reasonable publication history in the peer-reviewed lit and her letters there regarding reduced benefit of statins in women are sound and evidence-based.

That said, it's been known for a while among critical docs that statins should really only be rolled out to high-risk patients. There's been some shady business in the big sponsored trials re. low-risk patient groups that suggests there's insufficient benefit there.

As long as her book doesn't venture far past that territory, it's probably kosher.

Post reply on HN