5D Library › 胰岛素胰高血糖素双稳态、内脏脂解动力学与线性规划配餐 · English
第八章 这个月,以及那道闸
秤上实际会显示什么
一份二十八天的方案是靠对秤上数字的期待卖出去的,而秤上的数字是整件事里信息量最少的那个量。有三样东西同时在动。脂肪慢慢离开,按缺口允许的速率。糖原很快离开,连同与它结合的水一起,而碳水化合物一回来它就回来。秤本身还有噪声,因为肠内容物与体液逐日的变动比一天减掉的脂肪还多。Hall 等人提出了用模型而不是外推一个缺口的一般性理由 (Hall et al. 2011);p15 做的是带不完美依从性的那个窄版本,因为第三章那些试验发现真正在变的东西正是依从性 (Trepanowski et al. 2017)。
推导
# Chapter 8. p15: What twenty-eight days on the plan does to the scale,
# and why the scale is a poor witness. Three things move at once: fat,
# which the deficit removes slowly; glycogen with the water bound to it,
# which a low-carbohydrate week removes quickly and which returns the
# moment carbohydrate does; and the day-to-day noise of gut contents and
# fluid. Adherence is not perfect: the deficit achieved each day is the
# target times a draw between nought and one and a bit. Four thousand
# paths, seed 95, so the figures repeat exactly.
import random
SEED, PATHS, DAYS = 95, 4000, 28
TARGET = 500.0 # kcal a day aimed at
KCAL_PER_G = 7.7 # adipose tissue
GLY_KG = 1.60 # kg of glycogen and the water bound to it
GLY_DAYS = 6 # days over which that store is drawn down
NOISE_KG = 0.45 # day-to-day scale noise, one standard deviation
ADHERE_A, ADHERE_B = 0.55, 1.25
def one(rng):
fat_g = 0.0
weights = []
for d in range(DAYS):
adhere = rng.uniform(ADHERE_A, ADHERE_B)
fat_g += TARGET * adhere / KCAL_PER_G
gly = GLY_KG * min(1.0, (d + 1) / GLY_DAYS)
weights.append(-fat_g / 1000.0 - gly + rng.gauss(0.0, NOISE_KG))
return fat_g / 1000.0, weights
def q(v, a):
s = sorted(v)
return s[int(a * (len(s) - 1))]
if __name__ == "__main__":
rng = random.Random(SEED)
fat, scale, w1, w4, rose = [], [], [], [], 0
for _ in range(PATHS):
f, w = one(rng)
fat.append(f)
scale.append(w[-1])
w1.append(w[6])
w4.append(w[-1] - w[20])
if w[-1] > w[20]:
rose += 1
print(" {} paths of {} days, target deficit {:.0f} kcal a day"
.format(PATHS, DAYS, TARGET))
print(" fat lost, kg: median {:.3f}, 10% to 90% {:.3f} to {:.3f}"
.format(q(fat, 0.5), q(fat, 0.1), q(fat, 0.9)))
print(" scale change at day {}, kg: median {:.3f},"
" 10% to 90% {:.3f} to {:.3f}".format(DAYS, q(scale, 0.5),
q(scale, 0.1),
q(scale, 0.9)))
print(" scale change at day 7, kg: median {:.3f}".format(q(w1, 0.5)))
print(" of the day-7 fall, glycogen and water are {:.3f} kg"
.format(GLY_KG))
print(" so fat is only {:.3f} of what the scale showed in week one"
.format((q(fat, 0.5) * 7.0 / DAYS) / -q(w1, 0.5)))
print(" scale change over the last week, kg: median {:.3f}"
.format(q(w4, 0.5)))
print(" share of paths whose scale rose over the last week: {:.3f}"
.format(rose / PATHS))
print(" mean adherence achieved: {:.3f}"
.format((ADHERE_A + ADHERE_B) / 2.0))
print(" fat the plan would remove at full adherence: {:.3f} kg"
.format(TARGET * DAYS / KCAL_PER_G / 1000.0))
print(" median achieved as a share of that: {:.3f}"
.format(q(fat, 0.5) / (TARGET * DAYS / KCAL_PER_G / 1000.0)))
print(" the noise of one weighing, {:.2f} kg, is {:.2f} times the"
.format(NOISE_KG, NOISE_KG / (q(fat, 0.5) / DAYS)))
print(" fat a median day removes, which is why daily weighing"
" misleads")
# 4000 paths of 28 days, target deficit 500 kcal a day
# fat lost, kg: median 1.636, 10% to 90% 1.548 to 1.726
# scale change at day 28, kg: median -3.233, 10% to 90% -3.802 to -2.647
# scale change at day 7, kg: median -2.030
# of the day-7 fall, glycogen and water are 1.600 kg
# so fat is only 0.202 of what the scale showed in week one
# scale change over the last week, kg: median -0.409
# share of paths whose scale rose over the last week: 0.261
# mean adherence achieved: 0.900
# fat the plan would remove at full adherence: 1.818 kg
# median achieved as a share of that: 0.900
# the noise of one weighing, 0.45 kg, is 7.70 times the
# fat a median day removes, which is why daily weighing misleads在目标缺口每天 500 kcal、28 天、4000 条路径下,减掉脂肪的中位数是 1.636 kg,十分位到九十分位为 1.548 到 1.726,而完全依从时是 1.818 kg;中位达成为其 0.900,这个数就是平均依从度本身。第 28 天秤上变化的中位数是下降 3.233 kg,区间为 3.802 到 2.647。1.636 与 3.233 之间的差额是水,而它并不是方案所瞄准的任何东西的减少。
第一周是这件事在商业上要紧的地方。第 7 天秤上变化的中位数是下降 2.030 kg,其中 1.600 kg 是糖原与它的水,所以秤上显示的只有 0.202 是脂肪。第一周所卖的一切大半是水,而它会回来。
最后一周是这件事在心理上要紧的地方。最后一周秤上变化的中位数只有下降 0.409 kg,而有 0.261 的路径在那一周里显示秤在上升,尽管它们每一条自始至终都在减脂肪。一次称重带有 0.45 kg 的噪声,是中位一天所减脂肪的 7.70 倍。任何每天称重并对读数作出反应的人,八次里大约有七次是在对噪声作出反应。
假说 · 尚未验证
作者的诠释(尚未验证): 第四周的放弃是由秤的算术驱动的,而不是由饥饿驱动的,因为那正是四分之一依从者看到数字上升的那一周。什么会证明它错: 在一个每天称重并记录摄入的队列里,如果第四周的退出能由饥饿评分预测,而不能由此人自己的七日趋势是否转正预测,那么这套算术解释就是错的。
谁不可以尝试这件事
本书最后一项计算,才是任何以本书为基础的产品里应当最先出现的那一项。一套刻意压低胰岛素的方案与若干常用药物的相互作用可能是危险的,而在若干常见状况下它是绝对禁忌。p16 把取整后的人群流行率施加到一个合成的成年人群上,然后数人数。
推导
# Chapter 8. p16: How many readers the safety gate must turn away. A
# plan that lowers insulin on purpose is dangerous for some people and
# needs a doctor's supervision for others. The prevalences below are
# rounded from published population figures for adults in a developed
# country and are applied independently, which overstates how many
# people carry exactly one flag and understates how many carry several;
# the point is the order of magnitude of the gate, not a forecast.
# Twenty thousand synthetic adults, seed 95.
import random
SEED, N = 95, 20000
STOP = (
("type 1 diabetes", 0.0045),
("pregnant or breastfeeding", 0.0300),
("taking insulin", 0.0220),
("taking a sulfonylurea", 0.0180),
("taking an SGLT2 inhibitor", 0.0260),
("history of an eating disorder", 0.0290),
("kidney function below 45", 0.0150),
("body mass index below 20", 0.0400),
("under 18 or frail and over 70", 0.0600),
)
CARE = (
("treated high blood pressure", 0.2600),
("type 2 diabetes on metformin", 0.0700),
("gout or raised uric acid", 0.0400),
("gallstones", 0.0600),
("on a diuretic", 0.0900),
("thyroid medication", 0.0500),
)
if __name__ == "__main__":
rng = random.Random(SEED)
stop_n = care_n = clear_n = 0
stop_counts = [0] * len(STOP)
care_counts = [0] * len(CARE)
multi = 0
for _ in range(N):
s = [rng.random() < p for _, p in STOP]
c = [rng.random() < p for _, p in CARE]
for i, v in enumerate(s):
stop_counts[i] += v
for i, v in enumerate(c):
care_counts[i] += v
if any(s):
stop_n += 1
if sum(s) > 1:
multi += 1
elif any(c):
care_n += 1
else:
clear_n += 1
print(" {} synthetic adults".format(N))
print(" absolute stop flags, share carrying each:")
for (name, p), k in zip(STOP, stop_counts):
print(" {:<34}{:.4f} (set {:.4f})".format(name, k / N, p))
print(" needs supervision, share carrying each:")
for (name, p), k in zip(CARE, care_counts):
print(" {:<34}{:.4f} (set {:.4f})".format(name, k / N, p))
print(" turned away outright: {:.4f}".format(stop_n / N))
print(" of those, share with more than one stop flag: {:.4f}"
.format(multi / stop_n))
print(" cleared only with supervision: {:.4f}".format(care_n / N))
print(" free to proceed unsupervised: {:.4f}".format(clear_n / N))
print(" so the gate stops or refers {:.4f} of adults"
.format((stop_n + care_n) / N))
print(" a plan written for everyone is therefore written for"
" {:.4f} of them".format(clear_n / N))
# 20000 synthetic adults
# absolute stop flags, share carrying each:
# type 1 diabetes 0.0042 (set 0.0045)
# pregnant or breastfeeding 0.0285 (set 0.0300)
# taking insulin 0.0217 (set 0.0220)
# taking a sulfonylurea 0.0185 (set 0.0180)
# taking an SGLT2 inhibitor 0.0285 (set 0.0260)
# history of an eating disorder 0.0299 (set 0.0290)
# kidney function below 45 0.0146 (set 0.0150)
# body mass index below 20 0.0394 (set 0.0400)
# under 18 or frail and over 70 0.0590 (set 0.0600)
# needs supervision, share carrying each:
# treated high blood pressure 0.2542 (set 0.2600)
# type 2 diabetes on metformin 0.0688 (set 0.0700)
# gout or raised uric acid 0.0398 (set 0.0400)
# gallstones 0.0649 (set 0.0600)
# on a diuretic 0.0926 (set 0.0900)
# thyroid medication 0.0510 (set 0.0500)
# turned away outright: 0.2215
# of those, share with more than one stop flag: 0.0993
# cleared only with supervision: 0.3603
# free to proceed unsupervised: 0.4182
# so the gate stops or refers 0.5818 of adults
# a plan written for everyone is therefore written for 0.4182 of them在 20000 个合成成年人中,0.2215 至少带有一个绝对停止标志,而在这些人里又有 0.0993 带有一个以上。另有 0.3603 带有需要监督而非禁止的状况,于是剩下 0.4182 可以不经监督地进行。所以这道闸拦下或转诊了 0.5818 的成年人。
注
把这些标志明说出来。 p16 里的绝对停止项是:1 型糖尿病(本样本中 0.0042)、怀孕或哺乳(0.0285)、在用胰岛素(0.0217)、在用磺脲类(0.0185)、在用 SGLT2 抑制剂(0.0285)、任何进食障碍史(0.0299)、肾功能低于所述阈值(0.0146)、体质指数低于 20(0.0394),以及未满十八岁或七十岁以上且虚弱(0.0590)。在用胰岛素或磺脲类时,不改剂量而削减碳水化合物会造成低血糖。在用 SGLT2 抑制剂时,它可以在血糖正常的情况下造成酮症酸中毒,而这正是它被漏掉的原因。需要监督的那张清单,以 0.2542 的已治疗高血压居首,正是第五章那些钾的算术从昂贵变成危险的地方。以上没有任何一条能替代一位了解你具体病情的医生。
p16 里那个独立性假设在一个已知的方向上是错的:这些状况会聚集,所以恰好带一个标志的人数被高估了,带若干个的人数被低估了。这对这套方案没有帮助。聚集把风险集中到更少的人身上,却并不减少必须被拦下的人数,而真正要紧的那个数字,也就是被直接拦下的 0.2215,数的是带有任何一个标志的人,聚集只把它降低一点点。
小结
在 28 天里,减掉脂肪的中位数是 1.636 kg,而秤下降了 3.233 kg,第一周的下降里只有 0.202 是脂肪。最后一周下降的中位数是 0.409 kg,而 0.261 的路径显示秤在上升,单次称重的噪声是中位一天减脂的 7.70 倍。安全闸直接拦下 0.2215 的成年人,另外转诊 0.3603,剩下 0.4182 可以不经监督地进行。所以本书的算术是对一个机制的描述与对其大小的一个界,而不是一份让买书的人照着执行的方案。
参考文献
Fan, Y. (2026). Insulin-Glucagon Bistability, Visceral Lipolysis Kinetics and Linear-Programming Diet Optimization: Hepatic Glycogen Depletion Times, Triglyceride-Glucose Indices and Micronutrient-Constrained Menus [胰岛素胰高血糖素双稳态、内脏脂解动力学与线性规划配餐] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090248 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).