在 Hacker News Daily 上看到的方法,作者利用機器學習的方法試著找出那些因素導致他變胖,然後再規劃減肥計畫:「Discovering ketosis: how to effectively lose weight」,文章有點長,講重點。
首先作者把每天的體重與行為記錄起來,像是這樣:
# # -- Comment lines (ignored) # Date,MorningWeight,YesterdayFactors 2012-06-10,185.0, 2012-06-11,182.6,salad sleep bacon cheese tea halfnhalf icecream 2012-06-12,181.0,sleep egg 2012-06-13,183.6,mottsfruitsnack:2 pizza:0.5 bread:0.5 date:3 dietsnapple splenda milk nosleep 2012-06-14,183.6,coffeecandy:2 egg mayo cheese:2 rice meat bread:0.5 peanut:0.4 2012-06-15,183.4,meat sugarlesscandy salad cherry:4 bread:0 dietsnapple:0.5 egg mayo oliveoil 2012-06-16,183.6,caprise bread grape:0.2 pasadena sugaryogurt dietsnapple:0.5 peanut:0.4 hotdog 2012-06-17,182.6,grape meat pistachio:5 peanut:5 cheese sorbet:5 orangejuice:2 # and so on ...
當時只是記錄,並沒有刻意減肥:
I was not dieting at that time. Just collecting data.
剩下的就跑分析直接拉出哪些行為的幫助最大,於是就有這張圖了: