关于「公凭、密押与记录连接」,《直播锁单、流水核销与买手推荐》给出的定量结论是什么?

结论:第七章读宋代市舶司的公凭、日昇昌的密押与费勒吉和森特的记录连接理论:只有金额与时间相符的一行,后验只有 0.71663。

数据口径:书中的客户、延迟、比率与参数均为示意模型;全部计算由书中程序生成;本书不是法律、财务、银行或个人资料保护方面的建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。

English version

对照数据表

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

fieldagreedisagree
amount6.600-5.044
digits16.610never
nickname9.451-1.736
time2.375-2.623
amounttimeidentityweightP(match)
yesyesdigits agree17.9481.00000
yesyesnickname agrees10.7900.99944
yesyesnone shown1.3390.71663
yesnodigits agree12.9500.99987
yesnonickname agrees5.7920.98227
yesnonone shown-3.6590.07334
noyesdigits agree6.3040.98750
noyesnickname agrees-0.8550.35610
noyesnone shown-10.3060.00079
nonodigits agree1.3060.71201
nononickname agrees-5.8530.01701
nononone shown-15.3040.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}
}

本书其他章节结论