关于「买手推荐表与证伪方案:只用店内自有数据的闭环」,《稀疏购买记录的偏好补全》给出的定量结论是什么?

结论:第八章给出买手推荐表、蒸馏小工具「偏好补全推荐器」与预注册检验方案,每组需 3156 位顾客。书中以标注框区分已发表的证据、可运行的 Python 计算(23 段程序)、原典与作者的假说。

数据口径:书中顾客数、商品数、口味维度与购买概率均为示意参数;全部计算由书中程序生成;本书属于非个人化经营建议,推荐流程只用店铺自有数据,不外传个人数据,不做跨平台追踪。 第七章考辨《周易·系辞上》「方以类聚,物以群分」与斯皮尔曼 1904 年的一般因素,指出纯分群与混合成员下两种模型各有胜负。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 3156

z(0.975) = 1.9600, z(0.80) = 0.8416
controltreatedper armtotal
0.0400.050674513490
0.0400.05531566312
0.0400.06018633726
0.0800.10032136426
0.0800.11014992998
查看完整验算程序
# Chapter 8. p83: sample size for a pre-registered shelf test.
# Model: customers are randomised to a recommendation slot filled by
# popularity (control) or by the completed matrix (treatment); the
# outcome is whether the customer buys from the slot within 14 days.
# Two-sided two-proportion test, alpha 0.05, power 0.80 (normal
# approximation). Baseline and uplift values are illustrative.
import math
from statistics import NormalDist

za = NormalDist().inv_cdf(1 - 0.05 / 2)
zb = NormalDist().inv_cdf(0.80)


def n_arm(p1, p2):
    pb = (p1 + p2) / 2
    a = za * math.sqrt(2 * pb * (1 - pb))
    b = zb * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
    return math.ceil((a + b) ** 2 / (p1 - p2) ** 2)


print("z(0.975) = {:.4f}, z(0.80) = {:.4f}".format(za, zb))
print("  control   treated   per arm    total")
for p1, p2 in ((0.040, 0.050), (0.040, 0.055), (0.040, 0.060),
               (0.080, 0.100), (0.080, 0.110)):
    n = n_arm(p1, p2)
    print("   {:.3f}     {:.3f}    {:6d}   {:6d}".format(p1, p2, n, 2 * n))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《低秩矩阵补全与交替最小二乘、稀疏购买记录推断未表态偏好母典》第 8 章「买手推荐表与证伪方案:只用店内自有数据的闭环」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-328 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026328,
  author    = {Fan, Yafu},
  title     = {Low-Rank Matrix Completion and Alternating Least Squares: Inferring Unstated Preferences from Sparse Purchase Records},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论