关于「公凭、密押与记录连接」,《直播锁单、流水核销与买手推荐》给出的定量结论是什么?
结论:第七章读宋代市舶司的公凭、日昇昌的密押与费勒吉和森特的记录连接理论:只有金额与时间相符的一行,后验只有 0.71663。
数据口径:书中的客户、延迟、比率与参数均为示意模型;全部计算由书中程序生成;本书不是法律、财务、银行或个人资料保护方面的建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.71663
| field | agree | disagree | ||
| amount | 6.600 | -5.044 | ||
| digits | 16.610 | never | ||
| nickname | 9.451 | -1.736 | ||
| time | 2.375 | -2.623 | ||
| amount | time | identity | weight | P(match) |
| yes | yes | digits agree | 17.948 | 1.00000 |
| yes | yes | nickname agrees | 10.790 | 0.99944 |
| yes | yes | none shown | 1.339 | 0.71663 |
| yes | no | digits agree | 12.950 | 0.99987 |
| yes | no | nickname agrees | 5.792 | 0.98227 |
| yes | no | none shown | -3.659 | 0.07334 |
| no | yes | digits agree | 6.304 | 0.98750 |
| no | yes | nickname agrees | -0.855 | 0.35610 |
| no | yes | none shown | -10.306 | 0.00079 |
| no | no | digits agree | 1.306 | 0.71201 |
| no | no | nickname agrees | -5.853 | 0.01701 |
| no | no | none shown | -15.304 | 0.00002 |
查看完整验算程序
# Chapter 7. p14: Fellegi and Sunter's weights for a bank row and an
# order. For each field, m is the chance it agrees when the pair is a
# true match and u the chance it agrees by accident: amount with an
# offset 0..99 (m 0.97, u 0.01), last five digits when shown (1.0,
# 0.00001), a nickname in the note (0.70, 0.001) and a transfer within
# 30 minutes of the order (0.8647 for a mean delay of 15 minutes,
# 30 / 180 by chance). Agreement adds log2(m / u), disagreement adds
# log2((1 - m) / (1 - u)). With prior odds 1 : 199 that a given order
# is the one, we print each field's weights and, for every pattern of
# the amount, the time and one identity field, the posterior chance
# of a true match. No sampling.
import itertools
import math
FIELDS = (("amount", 0.97, 0.01), ("digits", 1.0, 0.00001),
("nickname", 0.70, 0.001), ("time", 0.8647, 30 / 180))
def w(m, u, agree):
if agree:
return math.log2(m / u)
return -math.inf if m == 1.0 else math.log2((1 - m) / (1 - u))
if __name__ == "__main__":
print(" field agree disagree")
for name, m, u in FIELDS:
d = w(m, u, False)
ds = " never" if d == -math.inf else "{:8.3f}".format(d)
print(" {:9s} {:6.3f} {}".format(name, w(m, u, True), ds))
prior = math.log2(1 / 199)
print(" amount time identity weight P(match)")
f = {n: (m, u) for n, m, u in FIELDS}
for a, t in itertools.product((True, False), repeat=2):
for ident in ("digits agree", "nickname agrees", "none shown"):
tot = prior + w(*f["amount"], a) + w(*f["time"], t)
if ident == "digits agree":
tot += w(*f["digits"], True)
elif ident == "nickname agrees":
tot += w(*f["nickname"], True)
p = 1 / (1 + 2 ** (-tot))
print(" {:6s} {:5s} {:15s} {:8.3f} {:.5f}".format(
"yes" if a else "no", "yes" if t else "no", ident, tot, p))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《海外连线脉冲库存锁、银行流水贝叶斯核销与个性化买手推荐系统》第 7 章「公凭、密押与记录连接」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-112 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026112,
author = {Fan, Yafu},
title = {Live-Shopping Flash Inventory Locks, Bayesian Bank-Feed Reconciliation and Personalized Styling CRM},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}