[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-arielf--weight-loss":3,"tool-arielf--weight-loss":65},[4,23,32,40,49,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":22},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,2,"2026-04-05T10:45:23",[13,14,15,16,17,18,19,20,21],"图像","数据工具","视频","插件","Agent","其他","语言模型","开发框架","音频","ready",{"id":24,"name":25,"github_repo":26,"description_zh":27,"stars":28,"difficulty_score":29,"last_commit_at":30,"category_tags":31,"status":22},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[17,13,20,19,18],{"id":33,"name":34,"github_repo":35,"description_zh":36,"stars":37,"difficulty_score":29,"last_commit_at":38,"category_tags":39,"status":22},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74939,"2026-04-05T23:16:38",[19,13,20,18],{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":46,"last_commit_at":47,"category_tags":48,"status":22},3215,"awesome-machine-learning","josephmisiti\u002Fawesome-machine-learning","awesome-machine-learning 是一份精心整理的机器学习资源清单，汇集了全球优秀的机器学习框架、库和软件工具。面对机器学习领域技术迭代快、资源分散且难以甄选的痛点，这份清单按编程语言（如 Python、C++、Go 等）和应用场景（如计算机视觉、自然语言处理、深度学习等）进行了系统化分类，帮助使用者快速定位高质量项目。\n\n它特别适合开发者、数据科学家及研究人员使用。无论是初学者寻找入门库，还是资深工程师对比不同语言的技术选型，都能从中获得极具价值的参考。此外，清单还延伸提供了免费书籍、在线课程、行业会议、技术博客及线下聚会等丰富资源，构建了从学习到实践的全链路支持体系。\n\n其独特亮点在于严格的维护标准：明确标记已停止维护或长期未更新的项目，确保推荐内容的时效性与可靠性。作为机器学习领域的“导航图”，awesome-machine-learning 以开源协作的方式持续更新，旨在降低技术探索门槛，让每一位从业者都能高效地站在巨人的肩膀上创新。",72149,1,"2026-04-03T21:50:24",[20,18],{"id":50,"name":51,"github_repo":52,"description_zh":53,"stars":54,"difficulty_score":46,"last_commit_at":55,"category_tags":56,"status":22},2234,"scikit-learn","scikit-learn\u002Fscikit-learn","scikit-learn 是一个基于 Python 构建的开源机器学习库，依托于 SciPy、NumPy 等科学计算生态，旨在让机器学习变得简单高效。它提供了一套统一且简洁的接口，涵盖了从数据预处理、特征工程到模型训练、评估及选择的全流程工具，内置了包括线性回归、支持向量机、随机森林、聚类等在内的丰富经典算法。\n\n对于希望快速验证想法或构建原型的数据科学家、研究人员以及 Python 开发者而言，scikit-learn 是不可或缺的基础设施。它有效解决了机器学习入门门槛高、算法实现复杂以及不同模型间调用方式不统一的痛点，让用户无需重复造轮子，只需几行代码即可调用成熟的算法解决分类、回归、聚类等实际问题。\n\n其核心技术亮点在于高度一致的 API 设计风格，所有估算器（Estimator）均遵循相同的调用逻辑，极大地降低了学习成本并提升了代码的可读性与可维护性。此外，它还提供了强大的模型选择与评估工具，如交叉验证和网格搜索，帮助用户系统地优化模型性能。作为一个由全球志愿者共同维护的成熟项目，scikit-learn 以其稳定性、详尽的文档和活跃的社区支持，成为连接理论学习与工业级应用的最",65628,"2026-04-05T10:10:46",[20,18,14],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":10,"last_commit_at":63,"category_tags":64,"status":22},3364,"keras","keras-team\u002Fkeras","Keras 是一个专为人类设计的深度学习框架，旨在让构建和训练神经网络变得简单直观。它解决了开发者在不同深度学习后端之间切换困难、模型开发效率低以及难以兼顾调试便捷性与运行性能的痛点。\n\n无论是刚入门的学生、专注算法的研究人员，还是需要快速落地产品的工程师，都能通过 Keras 轻松上手。它支持计算机视觉、自然语言处理、音频分析及时间序列预测等多种任务。\n\nKeras 3 的核心亮点在于其独特的“多后端”架构。用户只需编写一套代码，即可灵活选择 TensorFlow、JAX、PyTorch 或 OpenVINO 作为底层运行引擎。这一特性不仅保留了 Keras 一贯的高层易用性，还允许开发者根据需求自由选择：利用 JAX 或 PyTorch 的即时执行模式进行高效调试，或切换至速度最快的后端以获得最高 350% 的性能提升。此外，Keras 具备强大的扩展能力，能无缝从本地笔记本电脑扩展至大规模 GPU 或 TPU 集群，是连接原型开发与生产部署的理想桥梁。",63927,"2026-04-04T15:24:37",[20,14,18],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":79,"owner_location":80,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":81,"languages":82,"stars":107,"forks":108,"last_commit_at":109,"license":110,"difficulty_score":10,"env_os":111,"env_gpu":111,"env_ram":111,"env_deps":112,"category_tags":117,"github_topics":79,"view_count":29,"oss_zip_url":79,"oss_zip_packed_at":79,"status":22,"created_at":118,"updated_at":119,"faqs":120,"releases":150},1134,"arielf\u002Fweight-loss","weight-loss","Machine Learning meets  ketosis: how to effectively lose weight","weight-loss 是一个结合数据分析与生酮饮食理念的开源项目，旨在帮助用户通过量化个人健康数据实现有效减重。面对市面上众说纷纭的饮食建议和难以长期坚持的传统节食方案，weight-loss 提倡回归身体本能，利用真实数据分离信号与噪音，找到适合自己的可持续生活方式。\n\nweight-loss 适合希望用科学方法追踪身体状况的普通用户，同时也为熟悉 R 语言的开发者和研究人员提供了可复用的代码框架。其核心亮点在于提供了完整的脚本（如 date-weight.r）和示例数据集，用户只需导入自己的体重记录，即可借助 ggplot2 生成直观的体重变化趋势图。\n\n不同于严格的临床实验，weight-loss 更强调个人化的探索与发现。它不依赖专家权威，而是鼓励用户建立属于自己的数据信任体系。通过可视化代谢过程与饮食干预的关系，weight-loss 让健康管理变得透明且可控，帮助你在纷繁的信息中做出明智决策，轻松开启减重之旅。","Discovering ketosis: _how to effectively lose weight_\n=====================================================\n\n### _Here is a chart of my weight vs. time in the past 16 months or so:_\n\n ![weight vs time in the past 16 months or so](weight.2015.png  \"weight loss progress\")\n\n\nThe chart was generated from a data-set [`weight.2015.csv`](weight.2015.csv) by the script [`date-weight.r`](date-weight.r) in this git repository.  It requires [`R`](http:\u002F\u002Fr-project.org) and [`ggplot2`](http:\u002F\u002Fggplot2.org\u002F).\n\n\nIn the following I'll describe the thought process, some other people ideas, and the code I used to separate signal from noise. This separation was critical to help lead me in the right direction.\n\nThis github repository includes my code, [a Q&A section](QandA.md), and links\nfor further reading.\n\n\n#### Disclaimers:\n\nThe below is what worked for me. Your situation may be different. Listen to your own body. The code here is designed to be used on your own data, not on mine.\n\nAlso: this was *not* a scientific experiment, or a \"study\"; rather, it was a personal journey of experimentation and discovery.\n\nWith these behind us, I'd like to channel [Galileo in the face of the inquisition](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGalileo_affair): evolution has been hard at work for 2 billion years shaping the chemistry of all eukaryotes, multi-cellular life and eventually mammals. The Krebs cycle, glucose metabolism, insulin spikes, glycogen in the liver, carnitine, lipase, are as real for you as they are for me. We may be very different in our genes and traits, some are more insulin resistant, for example, but we cannot be too different in our most fundamental metabolic chemistry. The chemistry which drives fat synthesis and break-up.\n\n\n## Salient facts & initial observations\n\n- I used to be a pretty thin person. My 1st DMV card below, says 143 lb.\n- Unfortunately, since moving to the US, I've been gaining more and more weight. I peaked in 2015, over 50 lbs higher.\n- The US is a country where obesity is an epidemic.\n- Poorer demographics in the US have higher levels of obesity.\n\n![First DMV photo and weight (with full clothing)](1992-ariel-dmv.png \"143 pounds, sometime in the 90's\")\n\n\nDoes a US typical lifestyle has anything to do with this epidemic? After reading on the subject, I could point at a few of the main suspects:\n\n - Fast food is highly available, and is very cheap compared to most alternatives\n - Most food we buy and eat is heavily processed -- watch [Food, Inc. (documentary)](http:\u002F\u002Fwww.takepart.com\u002Ffoodinc\u002Ffilm)\n - \"No Fat\" and \"Low Fat\" labels are everywhere on supermarket shelves\n - Many foods are enriched and sweetened with high-fructose corn-syrup -- watch [Sugar Coated (documentary)](http:\u002F\u002Fsugarcoateddoc.com\u002F)\n\nAs in many other instances, I realized I need to think for myself. Ignore all \"expert\" advice. Question widely accepted ideas like the FDA \"food pyramid\". Start listening to my own body, my own logic & data I can collect myself and trust.\n\nOnce I did, the results followed.\n\n## What didn't work\n\nIn the past, I tried several times to change my diet. After reading one of Atkins' books, I realized, checked, and accepted the fact that excess carbs are a major factor in gaining weight. But that realization alone has not led to success.\n\nMy will power, apparently, was insufficient. I had too much love of pizza and bread.  I would reduce my carb consumption, lose a few pounds (typically ~5 pounds), and then break-down, go back to consuming excess carbs, and gain all these pounds back, and then some. My longest diet stretch lasted just a few months.\n\nIt was obvious that something was missing in my method. I just had to find it.  I could increase my physical activity, say start training for a mini-marathon, but that's not something I felt comfortable with.\n\nI realized early on that I need to adopt a lifestyle that not just reduces carbs, or add exercise, but is also sustainable and even enjoyable so it can turn into a painless routine. Something that:\n\n> - I could do for years\n> - Never feel the urge to break habits\n> - Is not hard, or unpleasant for me to do\n\n\n## Early insights & eureka moments\n\nEarly in the process I figured I could use [machine learning](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMachine_learning) to identify the factors that made me gain or lose weight. I used a simple method: every morning I would weigh myself, and record both the new weights and whatever I did in the past ~24 hours, not just the food I ate, but also whether I exercised, slept too little or too much, etc.\n\nThe file I kept was fairly simple. A CSV with 3 columns:\n\n> *Date*, *MorningWeight*, *Yesterday's lifestyle\u002Ffood\u002Factions*\n\nThe last column is a arbitrary-length list of *`word[:weight]`* items.\n\nThe (optional) numerical-weight following `:`, expresses higher\u002Flower quantities. The default weight, when missing is 1:\n\n    #\n    # -- Comment lines (ignored)\n    #\n    Date,MorningWeight,YesterdayFactors\n    2012-06-10,185.0,\n    2012-06-11,182.6,salad sleep bacon cheese tea halfnhalf icecream\n    2012-06-12,181.0,sleep egg\n    2012-06-13,183.6,mottsfruitsnack:2 pizza:0.5 bread:0.5 date:3 dietsnapple splenda milk nosleep\n    2012-06-14,183.6,coffeecandy:2 egg mayo cheese:2 rice meat bread:0.5 peanut:0.4\n    2012-06-15,183.4,meat sugarlesscandy salad cherry:4 bread:0 dietsnapple:0.5 egg mayo oliveoil\n    2012-06-16,183.6,caprise bread grape:0.2 pasadena sugaryogurt dietsnapple:0.5 peanut:0.4 hotdog\n    2012-06-17,182.6,grape meat pistachio:5 peanut:5 cheese sorbet:5 orangejuice:2\n    # and so on ...\n\n\nThen I wrote [a script](lifestyle-csv2vw) to convert this file to [vowpal-wabbit](https:\u002F\u002Fgithub.com\u002FJohnLangford\u002Fvowpal_wabbit\u002Fwiki) training-set regression format. In the converted train-set the label (target feature) is the change in weight (delta) in the past 24 hours, and the input features are what I've done or ate in the ~24 hours leading to this delta -- a straight copy of the 3rd column.\n\nI was not dieting at that time. Just collecting data.\n\nThe machine learning process error-convergence after partly sorting the lines descending, by `abs(delta)` to smooth it out and try to amplify very weak signals from the data, and 4-passes over the data, looks like this:\n\n![error convergence (after partial descending sort by delta)](vw-convergence.png  \"loss convergence in 4 data passes\")\n\nYou can reproduce my work by compiling your own data-file, installing all prerequisites, and running `make` in this directory.  I wrote a [HOWTO file with more detailed instructions](HOWTO.md). Please open an issue, if anything doesn't work for you.\n\nWhen you type `make` in this directory -- some magic happens.\n\nHere's how a typical result looks like.\n\n    $ make\n\n    ... (output trimmed for brevity) ...\n\n    FeatureName       HashVal   ...   Weight RelScore\n    nosleep            143407   ...  +0.6654 90.29%\n    melon              234655   ...  +0.4636 62.91%\n    sugarlemonade      203375   ...  +0.3975 53.94%\n    trailmix           174671   ...  +0.3362 45.63%\n    bread              135055   ...  +0.3345 45.40%\n    caramelizedwalnut  148079   ...  +0.3316 44.99%\n    bun                  1791   ...  +0.3094 41.98%\n\n    ... (trimmed for brevity. Caveat: data is too noisy anyway) ...\n\n    stayhome           148879   ...  -0.2690 -36.50%\n    bacon               64431   ...  -0.2998 -40.69%\n    egg                197743   ...  -0.3221 -43.70%\n    parmesan             3119   ...  -0.3385 -45.94%\n    oliveoil           156831   ...  -0.3754 -50.95%\n    halfnhalf          171855   ...  -0.4673 -63.41%\n    sleep              127071   ...  -0.7369 -100.00%\n\nThe positive (top) relative-score values are life-style choices that make you ***gain weight***, while the negative ones (bottom) make you ***lose weight***.\n\n\n##### And here's a variable-importance chart made from a similar data-set:\n\n\u003Ca href=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_9c517439a206.png\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_9c517439a206.png\" width=\"900\">\u003C\u002Fa>\n\nDisclaimer: please don't read too much into the particulars of this data. Working with this particular data set, was pretty challenging, since:\n\n- The number of original data-points (a bit over 100 days) may be too small to establish enough significance.\n- Typical daily changes in body weight are very small, often ~0.1 lb.\n- My scales are not accurate: you may note that my data has 0.2 pound resolution. This is not ideal. Getting scales with 0.1 pound resolution is highly recommended.\n- You may also note that the loss-convergence chart hits a hard floor at ~0.2 even when you do multiple-passes over the data (overfit the training-set) for a similar reason.\n- Items that make you lose and gain weight, often appear together on the same line so they cancel each other. This throws the automatic learning process off-course.\n- There were some misspellings in the original data (I hope I fixed all of these by now)\n\nSo I focused mostly on the extremes (start and end) of the list as presented above, and just used the hints as general guidance for further study, experimentation, and action.\n\nDespite the noisy & insufficient data, and the inaccuracies in weighting, the machine-learning experiments made 4 facts pretty clear, pretty early:\n\n- Sleeping longer consistently appeared as *the* #1 factor in losing weight.\n- Lack of sleep did the opposite: too little sleep lead to weight gains.\n- Carbs made me gain weight. The worst were high-starch and sugary foods.\n- Fatty and oily foods tended to do the opposite: they were positively correlated with weight-loss.\n\nThe 'stayhome' lifestlye, which fell mostly on weekends, may have been a red-herring: I slept longer when I didn't have to commute to work, OTOH: my diet on stay-home days may have been different.\n\nIt took me a while to figure out the sleep part. *When we sleep we don't eat*. It is that simple.\n\nMoreover: we tend to binge and snack while not particularly hungry, but we never do it during sleep.\n\nOur sleeping time is our longest daily fasting time.\n\nPlease note that my explanations of the effects may not in fact be accurate or deeply scientific.\nThe goal of all this was incremental discovery: experiment, check effect, rinse, repeat.\n\n## Further progress\n\nYou may note that in the top (date vs. weight) chart there's a notable acceleration in the rate of weight-loss.  The cause was deeper insights and better ability to sustain the diet the more I understood the problem.\n\n***Extending the fasting time*** was one major accelerator of weight-loss rate. I did that by:\n\n> - Skipping breakfast and\n> - Stop eating earlier in the evening before going to bed.\n\nThis gave me 14-16 hours of fasting each day. Rather than the more typical 10-12 hours\u002Fday of fasting.\n\nThe 2nd accelerator was ***consuming fatty stuff*** (instead of carbs) in order to feel full.\n\nThe 3rd accelerator was understanding the concepts of [Glycemic index](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index) and [***Glycemic Load***](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load), and shifting whatever I chose to eat towards ***lower Glycemic loads***.\n\nI now believe and hope that I can go all the way back to my original weight when I first landed on US soil.\n\nIf I can keep the present rate, it should take 1-2 years to completely reverse the damage of the past ~20 years.\n\nIt is important to stress that I also *feel much better the more weight I lose*. As a welcome side-effect, the few borderline\u002Fhigh levels in my blood tests, have moved significantly towards normal averages, during the period I lost weight.\n\n### What was my data and clear improvement in health saying?\n\nLooking at my data, and reading more, convinced me that I should beware of doctors [who push statins](https:\u002F\u002Fwww.google.com\u002Fsearch?q=the+truth+about+statins) instead of suggesting a better diet. I started doubting anyone who told me I need to *reduce* fat. I run away if anyone now tells me \"high cholesterol\" in the diet is dangerous.\n\nCholesterol, by the way, is an essential building block for many essential body by-products. The liver produces as much cholesterol as we need.\n\nOur body is an amazing machine. Billions of years of evolution have made it extremely *adaptive*.\n\nIt is not our ***high fat consumption***, it is the ***storage of fat process*** that makes us acummulate fat in the tissues and become unhealthy.\n\nAn enzyme called *Lipase* breaks-up fat. Raise the levels of Lipase and our body fat gets consumed faster. To get there, we need to give the body fat as an *alternative* to carbohydrates.  When the body has depleted both the blood sugar, and the glycogen (hydrated sugar) buffer in the liver, it has no other choice but to *adapt and compensate*.  Our source of energy -- [ATP synthesis](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAdenosine_triphosphate) -- switches from carbs to fats by producing more fat-breaking agents.  The body is a \"Flex Fuel\" kind of machine, that has simply replaced one fuel (carbs) with another (fat).\n\nWhen Lipase, and all other agents in the fat-to-ATP chemical path, aka [Beta oxidation](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FBeta_oxidation) mobilize, and their levels are elevated, we burn more fat and lose weight over time.\n\nIn a low-carb\u002Fhigh-fat (LCHF) regime, our night sleep (fasting time) becomes our friend.  The fat-breaking agents keep working while we sleep, breaking-up the stored fat.  This leads to weight-loss, and a healthier state.\n\nAnd when we push even further, and cut carbs to *really* low levels, we may reach a new steady state, called ketosis, in which practically all our energy comes from fat, and that's when we really win big in the weight-loss battle.\n\nThe above is a very simplified, and hopefuly easy to digest, version of what some diet books try to explain in hundreds of pages.\n\n## My bottom-line recipe:\n\n- The hardest part (especially at the beginning) is reducing carbs. The worst are starch rich foods (pizza, pasta, bread etc.), then processed foods with high sugar content (sweet sodas, no-pulp juices, etc). This doesn't mean ***no*** carbs. You may afford yourself carbs from time to time (say a pizza once a week). As it turns out, an occasional lapse isn't enough to completely reverse any steady-state.  However, you need to make sure you consume ***much less carbs*** and ***less frequently*** than before. In particular, you must avoid binging on snacks like chips, pizza, doughnuts, pasta, and bread, or drinking sugar-rich drinks.\n\n- [Look-up Glycemic index](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index) and [Glycemic Load](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load) on wikipedia. ***Avoid foods with high glycemic load***. This prevents the blood sugar spikes which lead to insulin spikes and tell the body chemical cycles to revert back from ketosis, or near ketosis, to fat-accumulation.  Have a sweet tooth? Eat an orange instead of drinking orange juice. The two have vastly different glycemic loads and this makes a huge difference. If you must add sweetness to your cup of tea or coffee, use a [Splenda (sucralose+dextrose) tablet](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSplenda), or [a Stevia drop\u002Ftablet](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStevia) which typically weight just ~0.1 gram, rather than a tea-spoon of sugar (~4.2g, about 40x more). Result: similar sweetness effect, but much lower Glycemic load and resulting levels of blood-glucose.\n\n- High fat: I switched from milk to half-and-half and am considering heavy (and unsweetened) whipped cream. It has less carbs (lactose) and more fat; plus, it tastes better.  Eat avocados, olive oil, mayo, coconut oil, nuts.  I never worry about *natural* fat, I eat as much fat as I want. This is what makes it much easier to avoid carbs. When I stuff myself with fat I feel much less hungry and miss the carbs less. The body is very good at figuring this out: \"I have too much fat in the blood, so let's increase the amount of enzymes which break-up fat\" and this makes me lose weight in the long run.  Most importantly, I always ***avoid any products labeled \"low-fat\" or \"fat-free\"***. The food industry usually replaces fat with sugar, so it tastes better - otherwise it tastes awful. You'll often hear about \"bad\" vs \"good\" fat. My take: as long as it is natural, it is ok. The worst trans-fat is fat that's artificially hydrogenated, to increase shelf-life, by the food industry. The less saturated fat is, the better. Mono-saturated (plant) liquid oil is the best, then come the poly-unsaturated fats, and finally near saturated (but not fully saturated) fats that come from animals. My buttery-spread spectrum is:  *Margarine: no; Butter: ok; Earth Balance: no problem*. At any rate, even the most saturated fat, gets broken and depleted by the natural processes in the body.\n\n- A bit of exercise.  Of course, more is better, but for many this may prove difficult. I don't excercise too much. I just bike to work and back about 20 min each way, meaning 40 min\u002Fday, 5 out of 7 days\u002Fweek. You can try walking the dog (but walk faster), or Zumba dance to music. The trick is to find something that you don't find hard to do. Or find company to do it together. Then, do a little bit of it every day.\n\n- ***Longer fasting periods:*** This is the #1 contributor to weight-loss. sleep longer, stop eating as early as possible before going to sleep and start eating as late as possible after sleeping. *Skip breakfast*, after some time you won't feel hungry in the morning anymore.  After long periods of fasting, the body chemistry adjusts. It needs ATP, but there's a too low level of glucose in the blood. The glycogen in the liver is fully consumed (this takes about 1-2 days of low or no carbs) so there's no other option, but to start looking for other sources, like stored fat. This elevates the enzymes that help with breaking up fat and the Krebs cycle reverses direction in the critical paths. Instead of transforming excess-carbs into stored fat, we break-up stored fat for energy.\n\n- Eat eggs.  They are a wonderful combo of fat and protein with no carbs at all.  I read an interview with a [Japanese woman who reached 114 years](Longevity.md) and one of her secrets was to eat eggs daily.  My favorite food is a scrambled egg with grilled onions (onions are a bit high on carbs, but too tasty to give up) and olives.\n\n- Eat slower, and chew longer... don't swallow just yet! Humans, just like dogs, tend to swallow too soon. Stop eating when you feel full. There's about 20 min delay before your brain registers that you are full so don't over-eat.\n\n***\n\n## Further reading:\n\n- [The Krebs (aka Citric acid) cycle](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCitric_acid_cycle)\n- [Spikes of Insulin and their effects](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSugar_crash) -- what the body does when it has excess of sugar vs excess of fat.\n- [Glycemic Index](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index)\n- [Glycemic Load](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load) -- a better metric for weight-loss than Glycemic Index.\n- [Glycogen and its storage in the liver](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycogen)\n- [Ketone bodies](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetone_bodies)\n- [Ketosis -- not to be confused with keto-acidosis](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetosis)\n- [Ketogenic diet](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetogenic_diet)\n\n\n\u003C!--\n- [The Eating Academy \u002F Peter Attia, M.D.](http:\u002F\u002Featingacademy.com\u002F)\n-->\n\n- [Why We Get Fat: And What to Do About It \u002F Gary Taubes](http:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fproduct\u002F0307272702)\n- [Summary of Good Calories, Bad Calories \u002F Gary Taub by Lower Thought](https:\u002F\u002Flowerthought.wordpress.com\u002Fcomplete-notes-to-good-calories-bad-calories\u002F)\n- [The Obesity Code: Unlocking the Secrets of Weight Loss \u002F Jason Fung](https:\u002F\u002Fwww.amazon.com\u002FObesity-Code-Unlocking-Secrets-Weight-ebook\u002Fdp\u002FB01C6D0LCK\u002F)\n- [The best summary about statins I've seen](http:\u002F\u002Fwww.newswithviews.com\u002FHowenstine\u002Fjames23.htm)\n- [High cholesterol doesn't cause heart disease](http:\u002F\u002Fwww.telegraph.co.uk\u002Fscience\u002F2016\u002F06\u002F12\u002Fhigh-cholesterol-does-not-cause-heart-disease-new-research-finds\u002F)\n- [Dr. Mark Hyman take on a good diet (a bit different than mine)](http:\u002F\u002Fdrhyman.com\u002Fblog\u002F2014\u002F08\u002F18\u002Fone-test-doctor-isnt-save-life\u002F)\n\n#### Documentaries:\n\n- [Food, Inc. (2008)](https:\u002F\u002Fwww.netflix.com\u002Ftitle\u002F70108783)\n-  [Sugar Coated (2015)](https:\u002F\u002Fwww.netflix.com\u002Ftitle\u002F80100595)\n\n#### More videos\n\n- [Reversing Type 2 diabetes starts with ignoring the guidelines | Sarah Hallberg | TEDxPurdueU](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=da1vvigy5tQ)\n\nA nice 7:41 minute video of James McCarter in Quantified Self (an eye opener for me):\n\n- [James McCarter: The Effects of a Year in Ketosis](https:\u002F\u002Fvimeo.com\u002F147795263)\n\n#### Questions, Answers, Comments\n\n[Some questions and comments I got and tried to answer](QandA.md)\n\n\u003C!--\n#### More friendly interface\n\n[Shyal Beardsley](http:\u002F\u002Fshyal.com) has built a starter front-end for this: ***[weightbrains.com](http:\u002F\u002Fweightbrains.com)***\n(Note and fair warning: this is a prototype, experimental, work in progress)\n-->\n\n## Acknowledgements\n\nBig thanks to the following people for contributing to this project in myriad ways,\ncomments, references, corrections, etc.\n\n_Anat Faigon, Ingrid Kane, Hans Lee, Steve Malmskog, Eyal Friedman, Shiri Shoham, Gabi Harel, Shingi, Noa_\n\n_Update: 2016-08-12: this project made [Hacker News](https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=12279415) and reached the top place for a while. Thanks for some great comments by benkuhn, aab0, zzleeper, and others which helped me make it better._\n![image of this project on Hacker News 2016-08-12](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_76d6f9631cdb.png)\n\nSpecial thanks to John Langford and the many other contributors to [vowpal wabbit](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FVowpal_Wabbit).\n\n\n#### License:\n\nThis code and additional material are released under a permissive and simple [2-clause BSD licence](Licence.md).  The one sentence summary of this is \"as long as you don't sue me and not claim it as your own, you should be ok.\"\n\n","发现酮症：_如何有效减肥_\n=====================================================\n\n### _以下是过去约16个月我的体重随时间变化的图表：_\n\n ![过去16个月左右的体重与时间关系](weight.2015.png  \"减重进展\")\n\n\n该图表由本Git仓库中的脚本[`date-weight.r`](date-weight.r)基于数据集[`weight.2015.csv`](weight.2015.csv)生成。它需要安装[`R`](http:\u002F\u002Fr-project.org)和[`ggplot2`](http:\u002F\u002Fggplot2.org\u002F)。\n\n以下我将描述自己的思考过程、他人的相关见解，以及用于从杂乱数据中提取有效信号的代码。这一“去噪”步骤至关重要，帮助我找到了正确的方向。\n\n本GitHub仓库包含我的代码、[问答部分](QandA.md)，以及更多阅读资源的链接。\n\n\n#### 免责声明：\n\n以下内容仅适用于我个人的情况。每个人的身体状况不同，请倾听自己身体的声音。此处提供的代码是为处理您自己的数据而设计的，而非我的数据。\n\n另外，这并非科学实验或研究，而是一次个人的探索与实践之旅。\n\n在说明了这些前提后，我想借用[伽利略面对宗教裁判时的态度](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGalileo_affair)来表达：进化已在过去的20亿年里不断塑造着所有真核生物、多细胞生物，乃至哺乳动物的代谢机制。三羧酸循环、葡萄糖代谢、胰岛素波动、肝脏中的糖原储存、肉碱、脂肪酶等生理过程，对我和您来说都同样真实。尽管我们的基因和体质可能存在差异——例如有些人胰岛素抵抗更严重——但在最基本的代谢化学层面，我们并不会有太大区别。正是这些化学反应驱动着脂肪的合成与分解。\n\n\n## 关键事实与初步观察\n\n- 我曾经相当瘦削。下图是我的第一张DMV驾照照片，上面显示体重为143磅。\n- 不幸的是，自从移居美国后，我的体重不断增加。到2015年时，我达到了峰值，比原来重了50多磅。\n- 美国正面临肥胖症的流行问题。\n- 在美国，经济条件较差的人群中，肥胖率更高。\n\n![第一张DMV照片及体重（穿着全套衣服）](1992-ariel-dmv.png \"143磅，大约在90年代\")\n\n\n那么，典型的美国生活方式是否与这场肥胖流行有关呢？经过查阅相关资料，我发现以下几个主要嫌疑因素：\n\n - 快餐随处可见，且价格远低于大多数其他选择。\n - 我们购买和食用的食品大多高度加工——可观看纪录片《食品公司》(Food, Inc.)。\n - 超市货架上随处可见“无脂肪”和“低脂肪”的标签。\n - 许多食品都添加了高果糖玉米糖浆以增甜——可观看纪录片《甜蜜陷阱》(Sugar Coated)。\n\n如同许多其他情况一样，我意识到必须独立思考，摒弃所有所谓的“专家”建议，质疑那些广为接受的观点，比如FDA的“食物金字塔”。我开始倾听自己的身体，依据自己的逻辑和亲自收集的数据做出判断。\n\n一旦我这样做了，效果便随之而来。\n\n## 哪些方法没有奏效\n\n过去，我曾多次尝试改变饮食习惯。读过阿特金斯的书籍后，我清楚地认识到：过量的碳水化合物确实是导致体重增加的主要因素之一。然而，仅仅意识到这一点，并不足以让我成功。\n\n显然，我的意志力不够强大。我对披萨和面包情有独钟。每次减少碳水化合物摄入，我确实会减掉几磅（通常约5磅），但很快就会崩溃，重新大量进食碳水化合物，结果不仅把减掉的体重全部反弹回来，甚至还更多。我坚持最久的一次饮食调整也只持续了几个月。\n\n很明显，我的方法中缺少某些关键要素。我必须找到它们。虽然我可以增加体育锻炼，比如开始为迷你马拉松训练，但这并不是我真正愿意长期坚持的事情。\n\n我很快意识到，我需要采取一种既能减少碳水化合物摄入、又能融入日常生活的健康方式，而且这种生活方式还应该是可持续的，甚至令人愉悦的，从而成为一种毫不费力的习惯。具体来说，它应该具备以下特点：\n\n> - 可以坚持多年\n> - 不会让人产生打破习惯的冲动\n> - 对我而言并不困难或令人不快\n\n## 早期洞见与顿悟时刻\n\n在项目初期，我意识到可以利用[机器学习](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMachine_learning)来识别影响体重增减的因素。我采用了一种简单的方法：每天早晨称重，并记录当天的体重以及过去约24小时内所做的一切——不仅包括饮食，还包括是否锻炼、睡眠时间过长或过短等。\n\n我保存的数据文件非常简洁，是一个包含三列的CSV文件：\n\n> *日期*, *晨间体重*, *昨日生活方式\u002F食物\u002F行为*\n\n最后一列是一个任意长度的列表，由形如`单词[:权重]`的条目组成。\n\n冒号后面的可选数值权重表示该因素的影响程度高低。若未指定权重，则默认为1：\n\n    #\n    # -- 注释行（忽略）\n    #\n    日期,晨间体重,昨日因素\n    2012-06-10,185.0,\n    2012-06-11,182.6,沙拉 睡眠 培根 奶酪 茶 半奶油 冰淇淋\n    2012-06-12,181.0,睡眠 鸡蛋\n    2012-06-13,183.6,motts水果零食:2 披萨:0.5 面包:0.5 枣:3 减肥苹果 Splenda 牛奶 不睡觉\n    2012-06-14,183.6,咖啡 糖果:2 鸡蛋 蛋黄酱 奶酪:2 米饭 肉类 面包:0.5 花生:0.4\n    2012-06-15,183.4,肉类 无糖糖果 沙拉 樱桃:4 面包:0 减肥苹果:0.5 鸡蛋 蛋黄酱 橄榄油\n    2012-06-16,183.6,凯撒沙拉 面包 葡萄:0.2 帕萨迪纳甜酸奶 减肥苹果:0.5 花生:0.4 热狗\n    2012-06-17,182.6,葡萄 肉类 开心果:5 花生:5 奶酪 冰糕:5 橙汁:2\n    # 以此类推 ...\n\n随后，我编写了一个[脚本](lifestyle-csv2vw)，将该文件转换为[vowpal-wabbit](https:\u002F\u002Fgithub.com\u002FJohnLangford\u002Fvowpal_wabbit\u002Fwiki)训练集的回归格式。在转换后的训练集中，标签（目标特征）是过去24小时内的体重变化量（delta），而输入特征则是导致这一变化的过去约24小时内所做的事情或所吃的食物——直接复制自第三列的内容。\n\n当时我并没有刻意节食，只是在收集数据。\n\n经过对数据按`abs(delta)`降序部分排序以平滑数据并尝试放大其中微弱信号，再进行四次遍历后，机器学习过程中的误差收敛情况如下所示：\n\n![误差收敛图（按delta部分降序排列后）](vw-convergence.png  \"4次数据遍历中的损失收敛\")\n\n你可以通过整理自己的数据文件、安装所有依赖项，并在此目录下运行`make`命令来复现我的工作。我还编写了一份[包含更详细说明的指南](HOWTO.md)。如果遇到任何问题，请提交issue。\n\n当你在这个目录下输入`make`时，就会发生一些神奇的事情。\n\n以下是一个典型的输出结果：\n\n    $ make\n\n    ... （为简洁起见，省略了部分输出） ...\n\n    特征名称       哈希值   ...   权重 相对得分\n    不睡觉            143407   ...  +0.6654 90.29%\n    甜瓜              234655   ...  +0.4636 62.91%\n    加糖柠檬水      203375   ...  +0.3975 53.94%\n    跑步混合坚果    174671   ...  +0.3362 45.63%\n    面包              135055   ...  +0.3345 45.40%\n    焦糖核桃        148079   ...  +0.3316 44.99%\n    小圆面包          1791   ...  +0.3094 41.98%\n\n    ... （为简洁起见，省略了部分内容。需要注意的是，数据本身过于嘈杂） ...\n\n    待在家           148879   ...  -0.2690 -36.50%\n    培根               64431   ...  -0.2998 -40.69%\n    鸡蛋                197743   ...  -0.3221 -43.70%\n    帕尔马干酪         3119   ...  -0.3385 -45.94%\n    橄榄油           156831   ...  -0.3754 -50.95%\n    半奶油           171855   ...  -0.4673 -63.41%\n    睡眠              127071   ...  -0.7369 -100.00%\n\n正数（顶部）的相对得分代表那些会让你***增加体重***的生活方式选择，而负数（底部）则代表那些会让你***减轻体重***的选择。\n\n\n##### 这里是一张基于类似数据集生成的重要性图表：\n\n\u003Ca href=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_9c517439a206.png\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_9c517439a206.png\" width=\"900\">\u003C\u002Fa>\n\n免责声明：请勿过度解读这些数据的具体细节。使用这套特定的数据集进行分析颇具挑战性，原因如下：\n\n- 原始数据点数量（略多于100天）可能太少，难以得出具有统计显著性的结论。\n- 日常体重变化通常非常小，往往只有约0.1磅。\n- 我的体重秤精度不足：你可能会注意到我的数据分辨率是0.2磅，这并不理想。强烈建议使用分辨率为0.1磅的体重秤。\n- 你也可能注意到，即使多次遍历数据（过度拟合训练集），损失收敛曲线也会在约0.2处达到平台期，这也是同样的原因。\n- 导致体重增加和减少的因素常常出现在同一行中，从而相互抵消，这会使自动学习过程偏离方向。\n- 原始数据中存在一些拼写错误（我希望现在已经全部修正了）。\n\n因此，我主要关注上述列表中的极端情况（开头和结尾），并将这些提示作为进一步研究、实验和行动的总体指导。\n\n尽管数据嘈杂且不充分，权重标注也存在误差，但机器学习实验还是在早期就清晰地揭示了四个事实：\n\n- 长时间睡眠始终被确认为减轻体重的*第一*重要因素。\n- 缺乏睡眠则相反：睡眠不足会导致体重增加。\n- 碳水化合物会让我体重增加，尤其是高淀粉和含糖食物。\n- 脂肪和油腻食物则倾向于产生相反的效果：它们与体重减轻呈正相关。\n\n“待在家”这种生活方式主要发生在周末，可能只是一个误导性因素：我不用通勤上班时确实睡得更久；另一方面，我在家里的饮食习惯也可能有所不同。\n\n关于睡眠这一点，我花了一段时间才弄明白。*当我们睡觉时，我们不会进食*。就这么简单。\n\n此外，我们在并不特别饥饿的时候往往会暴饮暴食或零食不断，但在睡眠期间却绝不会如此。\n\n我们的睡眠时间实际上是我们每日最长的禁食时段。\n\n请注意，我对这些效应的解释未必准确或具备深厚的科学依据。\n这一切的目标都是逐步发现：实验、观察效果、重复操作。\n\n## 更进一步的进展\n\n你可能会注意到，在上方的图表（日期对比体重）中，减重速度出现了显著加快。其原因在于，随着我对问题理解的加深，我获得了更深入的洞察，并且更有能力坚持饮食计划。\n\n**延长空腹时间**是加速减重的一个重要因素。我是通过以下方式做到的：\n\n> - 跳过早餐，\n> - 并在晚上睡前更早停止进食。\n\n这样一来，我每天的空腹时间达到了14到16小时，而通常的空腹时间仅为10到12小时。\n\n第二个加速因素是**摄入富含脂肪的食物**（而非碳水化合物），以帮助自己保持饱腹感。\n\n第三个加速因素则是对[血糖指数](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index)和[血糖负荷](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load)概念的理解，并在我选择食物时尽量偏向**低血糖负荷**的选项。\n\n我现在相信并希望，自己能够完全恢复到刚踏上美国土地时的初始体重。\n\n如果我能维持目前的减重速度，大约需要1到2年的时间，就能彻底扭转过去近20年造成的身体负担。\n\n需要强调的是，随着体重的减轻，我的整体感觉也变得更好。作为一项令人欣喜的副作用，在我减重的过程中，血液检查中原本处于临界值或偏高水平的几项指标，已经显著向正常范围靠拢。\n\n### 我的数据与明显的健康改善说明了什么？\n\n通过分析自己的数据并进一步学习，我更加确信，应当警惕那些**推荐他汀类药物**却不愿建议改善饮食的医生。我也开始质疑任何告诉我需要“减少”脂肪摄入的人。如今，只要有人再跟我说“饮食中的高胆固醇”很危险，我就会立刻远离他们。\n\n顺便一提，胆固醇是许多重要体内代谢产物不可或缺的原料。肝脏会根据我们的需求自行合成所需的胆固醇量。\n\n人体是一台极其精密而神奇的机器。经过数十亿年的进化，它具备极强的**适应性**。\n\n真正导致我们体内脂肪堆积、健康受损的，并不是**高脂肪摄入**，而是**脂肪储存的过程**。\n\n一种名为**脂肪酶**的酶能够分解脂肪。提高脂肪酶的水平，就能让体内的脂肪更快地被消耗掉。要做到这一点，我们需要为身体提供脂肪作为碳水化合物的替代来源。当血液中的糖分以及肝脏内储存的糖原缓冲耗尽后，身体别无选择，只能**适应并进行补偿**。此时，我们的能量来源——[ATP的合成](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAdenosine_triphosphate)——会从依赖碳水化合物转向利用脂肪，同时增加脂肪分解酶的分泌。可以说，人体就像一台“柔性燃料”发动机，只不过将一种燃料（碳水化合物）替换成了另一种燃料（脂肪）。\n\n当脂肪转化为ATP的整个化学途径中的关键酶，包括脂肪酶在内的各种分解酶被充分动员并提升活性时，我们就能持续燃烧更多脂肪，从而实现长期的减重效果。\n\n在低碳高脂（LCHF）的饮食模式下，夜晚的睡眠时间（即空腹时间）反而成了我们的朋友。因为在睡眠期间，脂肪分解酶仍在持续工作，不断分解体内储存的脂肪。这不仅有助于减重，还能使身体更加健康。\n\n而如果我们进一步降低碳水化合物的摄入量，使其降至极低水平，就有可能进入一种新的稳定状态——酮症。在这种状态下，我们几乎所有的能量都来源于脂肪，而这正是我们在减重之战中取得重大胜利的关键时刻。\n\n以上内容是对一些饮食书籍用数百页篇幅所阐述内容的高度简化版本，希望能让大家更容易理解和接受。\n\n## 我的终极饮食法则：\n\n- 最难的部分（尤其是刚开始时）就是减少碳水化合物的摄入。最糟糕的是富含淀粉的食物（披萨、意大利面、面包等），其次是含糖量高的加工食品（甜饮料、无果肉果汁等）。但这并不意味着完全不吃碳水化合物。你可以偶尔允许自己摄入一些碳水化合物（比如每周吃一次披萨）。事实证明，偶尔的放纵并不会完全逆转你已经建立起来的稳定状态。不过，你需要确保现在的碳水化合物摄入量要比以前少得多，而且频率也要低得多。尤其要避免暴饮暴食薯片、披萨、甜甜圈、意大利面和面包等零食，或者饮用含糖量高的饮料。\n\n- 在维基百科上查阅[血糖指数](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index)和[血糖负荷](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load)。***尽量避免高血糖负荷的食物***。这样可以防止血糖急剧升高，从而避免胰岛素飙升，并阻止身体的代谢循环从酮症或接近酮症状态重新转回脂肪储存模式。如果你特别喜欢甜食，不妨吃一个橙子，而不是喝橙汁。两者的血糖负荷差异巨大，效果也大不相同。如果一定要在茶或咖啡中加甜味，可以使用一粒[Splenda（三氯蔗糖+葡萄糖）甜味剂](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSplenda)，或者一滴\u002F一片[甜菊糖](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStevia)，其重量通常只有约0.1克，而不是用一茶匙糖（约4.2克，是前者的40倍）。结果是：甜度相似，但血糖负荷和随之而来的血糖水平要低得多。\n\n- 高脂肪：我已将牛奶换成半奶油，并且正在考虑使用浓稠的（无糖）鲜奶油。它不仅碳水化合物（乳糖）含量更低，脂肪含量更高，而且味道也更好。多吃牛油果、橄榄油、蛋黄酱、椰子油和坚果。对于天然脂肪，我从来不用担心，想吃多少就吃多少。这样做能更容易地控制碳水化合物的摄入。当我摄入足够多的脂肪时，饥饿感会明显减轻，对碳水化合物的渴望也会减少。身体非常善于自我调节：“血液中的脂肪过多，那就增加分解脂肪的酶的分泌”，这样一来，长期来看体重就会下降。最重要的是，我始终***避免任何标有‘低脂’或‘脱脂’的产品***。食品工业通常会用糖来替代脂肪，这样食物才会更好吃——否则味道会非常糟糕。人们经常提到“坏脂肪”和“好脂肪”的区别。我的观点是：只要是天然的，就没问题。最糟糕的反式脂肪是由食品工业为了延长保质期而人工氢化产生的。饱和脂肪越少越好。单不饱和脂肪（植物油）是最好的，其次是多不饱和脂肪，最后才是动物来源的接近饱和但未完全饱和的脂肪。在我常用的涂抹类食品中：*人造黄油：不行；黄油：可以；Earth Balance：没问题*。无论如何，即使是饱和度最高的脂肪，最终也会被人体内的自然代谢过程分解并消耗掉。\n\n- 适量运动。当然，运动越多越好，但对很多人来说可能比较困难。我并没有刻意进行大量运动，只是每天骑自行车上下班，单程大约20分钟，也就是每天40分钟，一周5天。你也可以试着带狗快步遛弯，或者跟着音乐跳尊巴舞。关键是要找到一件你觉得不费力的事情来做，或者找个人一起做，然后每天都坚持一点点。\n\n- ***延长空腹时间：*** 这是减肥的首要因素。多睡一会儿，在睡前尽早停止进食，醒来后尽量晚一点再开始吃。*可以尝试不吃早餐*，过一段时间后你会发现早上不再感到饥饿了。经过长时间的空腹，身体的代谢会发生调整。虽然需要ATP能量，但血液中的葡萄糖水平已经很低。肝脏中的糖原也被完全消耗殆尽（这通常需要1到2天几乎不吃或只吃少量碳水化合物），于是身体别无选择，只能开始利用其他能量来源，比如储存的脂肪。这时，分解脂肪的酶活性会提高，而柠檬酸循环的关键路径也会发生逆转。我们不再把多余的碳水化合物转化为脂肪储存起来，而是将储存的脂肪分解为能量。\n\n- 多吃鸡蛋。它们是脂肪和蛋白质的完美组合，完全不含碳水化合物。我曾读过一篇关于一位[活到114岁的日本女性](Longevity.md)的采访，她保持健康的秘诀之一就是每天吃鸡蛋。我最喜欢的一道菜是炒鸡蛋配烤洋葱（洋葱的碳水化合物含量稍高，但实在太美味了，舍不得放弃）和橄榄。\n\n- 吃饭时放慢速度，多咀嚼……不要急着吞下去！人类和狗狗一样，往往吃得太快。当你觉得饱了的时候就应该停下来。大脑真正感受到饱腹感通常需要大约20分钟的延迟，所以千万不要暴饮暴食。\n\n***\n\n## 更多阅读：\n\n- [克雷布斯循环（又称柠檬酸循环）](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCitric_acid_cycle)\n- [胰岛素峰值及其影响](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSugar_crash) -- 身体在糖分过剩与脂肪过剩时的不同反应。\n- [血糖指数](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_index)\n- [血糖负荷](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycemic_load) -- 比血糖指数更适合用于体重管理的指标。\n- [糖原及其在肝脏中的储存](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FGlycogen)\n- [酮体](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetone_bodies)\n- [酮症 -- 不要与酮症酸中毒混淆](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetosis)\n- [生酮饮食](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FKetogenic_diet)\n\n\n\u003C!--\n- [饮食学院 \u002F 彼得·阿蒂亚医学博士](http:\u002F\u002Featingacademy.com\u002F)\n-->\n\n- [我们为什么会发胖：以及该如何应对 \u002F 盖里·陶布斯](http:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fproduct\u002F0307272702)\n- [《好卡路里，坏卡路里》摘要 \u002F 盖里·陶布斯，由Lower Thought整理](https:\u002F\u002Flowerthought.wordpress.com\u002Fcomplete-notes-to-good-calories-bad-calories\u002F)\n- [肥胖密码：解锁减肥的秘密 \u002F 杰森·冯](https:\u002F\u002Fwww.amazon.com\u002FObesity-Code-Unlocking-Secrets-Weight-ebook\u002Fdp\u002FB01C6D0LCK\u002F)\n- [我见过的最佳关于他汀类药物的总结](http:\u002F\u002Fwww.newswithviews.com\u002FHowenstine\u002Fjames23.htm)\n- [高胆固醇并不会导致心脏病](http:\u002F\u002Fwww.telegraph.co.uk\u002Fscience\u002F2016\u002F06\u002F12\u002Fhigh-cholesterol-does-not-cause-heart-disease-new-research-finds\u002F)\n- [马克·海曼博士对健康饮食的看法（与我的观点略有不同）](http:\u002F\u002Fdrhyman.com\u002Fblog\u002F2014\u002F08\u002F18\u002Fone-test-doctor-isnt-save-life\u002F)\n\n#### 纪录片：\n\n- [食品公司（2008年）](https:\u002F\u002Fwww.netflix.com\u002Ftitle\u002F70108783)\n- [甜蜜陷阱（2015年）](https:\u002F\u002Fwww.netflix.com\u002Ftitle\u002F80100595)\n\n#### 更多视频\n\n- [逆转2型糖尿病始于无视指南 | 萨拉·霍尔伯格 | TEDx普渡大学](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=da1vvigy5tQ)\n\n詹姆斯·麦卡特的一段精彩视频，在“量化自我”活动中拍摄，时长7分41秒，对我启发很大：\n\n- [詹姆斯·麦卡特：一年生酮状态的影响](https:\u002F\u002Fvimeo.com\u002F147795263)\n\n#### 问题、解答、评论\n\n[我收到的一些问题和评论及我的回答](QandA.md)\n\n\u003C!--\n#### 更友好的界面\n\n[Shyal Beardsley](http:\u002F\u002Fshyal.com) 为此项目搭建了一个初始前端：***[weightbrains.com](http:\u002F\u002Fweightbrains.com)***\n（请注意并提醒：这是一个原型、实验性且仍在开发中的项目）\n-->\n\n## 致谢\n\n非常感谢以下各位以各种方式为本项目做出贡献，包括评论、参考资料、更正等。\n\n_阿纳特·法伊贡、英格丽德·凯恩、汉斯·李、史蒂夫·马姆斯科格、埃亚尔·弗里德曼、希里·肖哈姆、加比·哈雷尔、辛吉、诺亚_\n\n_更新：2016年8月12日：该项目登上了[Hacker News](https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=12279415)，并一度位居榜首。感谢benkuhn、aab0、zzleeper等人的精彩评论，帮助我进一步完善了内容。_\n![该项目在Hacker News上的截图，2016年8月12日](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_readme_76d6f9631cdb.png)\n\n特别感谢约翰·兰福德以及[Vowpal Wabbit](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FVowpal_Wabbit)的众多贡献者。\n\n\n#### 许可证：\n\n本代码及其他相关材料采用宽松简单的[两条款BSD许可证](Licence.md)发布。其简要说明为：“只要你不起诉我，也不声称它是你自己的作品，你就没问题。”","### 快速上手指南：weight-loss\n\n---\n\n#### 环境准备  \n**系统要求**  \n- Linux\u002FmacOS（Windows需配置WSL）  \n- R 4.0+  \n- [vowpal-wabbit](https:\u002F\u002Fgithub.com\u002FJohnLangford\u002Fvowpal_wabbit) 9.0+  \n\n**前置依赖**  \n1. 安装 R 语言环境  \n   ```bash\n   # Ubuntu\u002FDebian\n   sudo apt-get install r-base\n   ```\n2. 安装 R 依赖库  \n   ```bash\n   R -e \"install.packages('ggplot2', repos='https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002FCRAN\u002F')\"\n   ```\n3. 安装 vowpal-wabbit  \n   ```bash\n   # 从源码编译（推荐）\n   git clone https:\u002F\u002Fgithub.com\u002FJohnLangford\u002Fvowpal_wabbit.git\n   cd vowpal_wabbit\n   .\u002Fautogen.sh && .\u002Fconfigure && make -j4 && sudo make install\n   ```\n\n---\n\n#### 安装步骤  \n1. 克隆仓库  \n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Fyourname\u002Fweight-loss.git\n   cd weight-loss\n   ```\n2. 安装其他依赖（如需）  \n   ```bash\n   # 示例：安装 Python 依赖（如有）\n   pip install -r requirements.txt\n   ```\n\n---\n\n#### 基本使用  \n1. 生成体重趋势图  \n   ```bash\n   Rscript date-weight.r\n   # 输出结果：weight.2015.png\n   ```\n2. 运行机器学习分析  \n   ```bash\n   make\n   # 输出结果：特征权重分析（如 scores.png）\n   ```\n3. 自定义数据训练  \n   - 准备 `weight.2015.csv` 数据文件  \n   - 修改 `lifestyle-csv2vw` 脚本适配数据格式  \n   - 执行训练：  \n     ```bash\n     .\u002Flifestyle-csv2vw your_data.csv | vw --loss_function=logistic\n     ```","某互联网公司产品经理张伟长期受肥胖困扰，尝试多种减重方法均未成功。他每日记录饮食和体重却无法发现规律，频繁反弹的体重数据让他陷入迷茫。\n\n### 没有 weight-loss 时\n- 缺乏有效数据可视化手段，手动整理的体重曲线难以发现趋势\n- 无法区分饮食调整与偶然波动的因果关系，常因短期数据波动放弃计划\n- 无个性化生酮方案指导，盲目限制碳水导致营养失衡\n- 无法持续跟踪代谢状态变化，难以调整饮食策略\n- 依赖传统节食方法，易陷入\"节食-暴食\"循环\n\n### 使用 weight-loss 后\n- 通过自动化图表生成清晰看到16个月体重变化趋势，识别出关键转折点\n- 利用机器学习算法分离饮食干预与自然波动，确认生酮饮食有效性\n- 根据代谢数据动态调整碳水摄入比例，避免营养失衡\n- 实时监控酮体水平变化，及时优化饮食结构\n- 建立可持续的生酮生活方式，体重稳定下降12公斤\n\nweight-loss 通过机器学习分析代谢数据，将模糊的减重经验转化为可执行的科学方案，帮助用户突破传统节食的局限性。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farielf_weight-loss_9c517439.png","arielf","Ariel Faigon","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Farielf_e6268d3f.jpg",null,"California","https:\u002F\u002Fgithub.com\u002Farielf",[83,87,91,95,99,103],{"name":84,"color":85,"percentage":86},"Python","#3572A5",40.2,{"name":88,"color":89,"percentage":90},"R","#198CE7",21.8,{"name":92,"color":93,"percentage":94},"Perl","#0298c3",17.8,{"name":96,"color":97,"percentage":98},"Makefile","#427819",15.1,{"name":100,"color":101,"percentage":102},"Shell","#89e051",2.9,{"name":104,"color":105,"percentage":106},"HTML","#e34c26",2.2,3312,143,"2026-04-05T04:28:08","NOASSERTION","未说明",{"notes":113,"python":111,"dependencies":114},"需要安装R语言环境和ggplot2库，运行脚本需配置vowpal-wabbit工具链。数据处理依赖CSV文件格式，建议使用Linux\u002FmacOS系统。",[88,115,116],"ggplot2","vowpal-wabbit",[18],"2026-03-27T02:49:30.150509","2026-04-06T08:18:26.312952",[121,126,131,136,141,146],{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},5113,"执行 make 时出现 OSError: No such file or directory 错误如何解决？","该问题可能由路径配置错误导致。维护者通过修改 shebang 路径并直接调用 Rscript 来修复。建议检查环境变量和依赖项安装路径，确保所有命令路径正确。参考评论中的修复方案：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F19","https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F19",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},5114,"如何处理数据中不同量的权重标记问题？","应根据相对单位进行标记。例如：若正常摄入3片面包，今日摄入7片则标记为 bread:2.33（相对于正常量）。若需强调某因素，应减少其权重值。维护者强调需保持标记一致性以确保结果准确性。参考评论中的权重逻辑说明：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F6","https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F6",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},5115,"输出文件 scores.txt 中的 \"Constant\" 行代表什么？","该行表示线性回归的偏置项（截距项），并非错误。维护者明确说明无需替换名称为数字ID，直接保留原始名称即可。参考评论中的解释：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F29","https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F29",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},5116,"如何计算模型预测的置信水平？","通过泊松自助法（Poisson(1)分布）生成置信区间。维护者在评论中说明可通过调整 Makefile 中的 bootstrapping 参数（默认7）来控制区间范围，并将结果保存到 *.range 文件。参考详细实现说明：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F15","https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F15",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},5117,"模型使用的具体机器学习算法是什么？","维护者未直接说明算法名称，但引用了论文 https:\u002F\u002Farxiv.org\u002Fabs\u002F1312.5021 作为方法参考。建议查阅该论文获取算法细节。参考评论中的文献引用：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F17","https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F17",{"id":147,"question_zh":148,"answer_zh":149,"source_url":145},5118,"如何处理数据中缺失值问题？","维护者在评论中提到算法设计时已考虑数据缺失情况，但未提供具体配置方法。建议在数据预处理阶段补充缺失值处理逻辑，或参考相关文献进一步验证。参考评论中的讨论：https:\u002F\u002Fgithub.com\u002Farielf\u002Fweight-loss\u002Fissues\u002F17",[]]