关于「实证闭环:每周订单量预测区间表、共形区间计算器与预注册检验」,《共形预测与订单区间》给出的定量结论是什么?
结论:第八章给出每周订单量预测区间表、蒸馏小工具「共形区间计算器」与预注册检验方案;按九成五单侧上界备货时,正态上界的缺货率为 0.0657,共形上界为 0.0382。书中以标注框区分已发表的证据、可运行的 Python 计算(23 段程序)、原典与作者的假说。
数据口径:书中参数为示意;全部计算由书中程序生成;本书属于非个人化经营建议。 本书作蓝图修正:正态区间的缺口是本书程序的模拟结果,集中在右尾与单侧上界;东方原典句出自《元史·郭守敬传》。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0382, 0.0657, 95
| 95% one-sided stock bound, 62 past weeks, 6000 histories | ||
| method | stock-out rate | mean stock / median demand |
| normal | 0.0657 | 1.725 |
| conformal | 0.0382 | 1.999 |
| target stock-out 0.05; conformal mean cover k/(m+1) = 0.9623 |
查看完整验算程序
# Chapter 8. p83: one-sided upper bounds for weekly stock.
# Model (illustrative): weekly demand 500 * exp(e), e normal sd 0.3,
# plus one bulk week in twenty at 1.8 times. From 62 past weeks a
# shop sets stock to a 95% upper bound: normal theory mean + t * s *
# sqrt(1 + 1/n) with t = 1.670 (Student t, 61 df, 0.95 point, from
# standard tables), or one-sided split conformal (10 weeks fit the
# median, 52 calibrate the signed score y - centre, k = ceil(53 *
# 0.95) = 51). Over 6,000 histories we count stock-outs in the next
# week and the mean stock held, in units of the median demand.
import math
import random
import statistics
def week(rng):
bulk = 1.8 if rng.random() < 0.05 else 1.0
return 500 * bulk * math.exp(rng.gauss(0.0, 0.3))
if __name__ == "__main__":
rng = random.Random(20261113)
out = {"normal": [], "conformal": []}
held = {"normal": [], "conformal": []}
for _ in range(6000):
xs = [week(rng) for _ in range(62)]
nxt = week(rng)
ub_n = statistics.fmean(xs) + 1.670 * statistics.stdev(xs) \
* math.sqrt(1 + 1 / 62)
c = statistics.median(xs[:10])
sc = sorted(x - c for x in xs[10:])
ub_c = c + sc[math.ceil(53 * 0.95) - 1]
for name, ub in (("normal", ub_n), ("conformal", ub_c)):
out[name].append(nxt > ub)
held[name].append(ub / 500)
print("95% one-sided stock bound, 62 past weeks, 6000 histories")
print("method stock-out rate mean stock / median demand")
for name in ("normal", "conformal"):
print("{:<10s} {:.4f} {:.3f}".format(
name, len([x for x in out[name] if x]) / 6000,
statistics.fmean(held[name])))
print("target stock-out 0.05; conformal mean cover k/(m+1) = {:.4f}"
.format(51 / 53))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《共形预测与无分布区间、订单量与客单价有限样本覆盖保证母典》第 8 章「实证闭环:每周订单量预测区间表、共形区间计算器与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-306 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026306,
author = {Fan, Yafu},
title = {Conformal Prediction and Distribution-Free Intervals: Finite-Sample Coverage Guarantees for Order Counts and Order Values},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}