关于「谁会是明年的鲸鱼:BG/NBD 与高价值预测」,《鲸鱼客群与尊享档》给出的定量结论是什么?
结论:BG/NBD 把购买速率与悄悄流失分开建模,只用复购次数、最后购买时间与观察期三项摘要就能估计参数。合成账簿上,四个参数里两个估得很准,两个受似然面平坦所累偏差稍大;条件预测在全书层面与模拟结果相差约四个百分点;认出明年前 2 % 的命中率是 0.625,高于按消费额排名的 0.450。
数据口径:核对原始文献之后做了蓝图修正:幂律必须先检验,一本纯对数正态的合成账簿通过了幂律拟合优度检验,p 值 0.430,只有似然比检验给出 z 为 -1.271、无法裁决;前 2 % 的利润份额随尾部形状从 0.121 变到 0.768,只能按区间报;「自动显影」用 BG/NBD 模型认出下一年前 2 % 客户的命中率是 0.625,不是 1;诱饵效应在自然呈现下可能减弱或反转;「隐式探针」改写为对所有访客公开、可自选的入口。 书中参数为示意,全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.450, 0.625
| top 40 of 2,000 customers; year-2 revenue 104,253 | ||
| oracle top-40 share of year-2 revenue 0.525 | ||
| rule | precision | share of year-2 revenue |
| year-1 spend | 0.450 | 0.382 |
| repeat count | 0.250 | 0.257 |
| BG/NBD value | 0.625 | 0.445 |
| BG/NBD gain over year-1 spend 0.175 (bar for upkeep 0.1) |
查看完整验算程序
# Chapter 3. p33: which ranking rule finds next year's top 2 percent?
# Model: 2,000 synthetic BG/NBD customers (parameters of p31) with a
# personal mean basket m ~ lognormal(3.0, 1.0) and basket noise
# exp(N(-0.08, 0.4)); the first purchase is at week 0. Rules rank on
# year-1 data only: (1) year-1 spend, (2) repeat count x, (3) BG/NBD
# expected purchases times a shrunk average basket (weight 2 on the
# book mean). Truth is year-2 spend. Precision = overlap of the top 40.
import math
import random
R, AL, A, B = 0.6, 4.0, 0.8, 2.5
def simulate(n, rng):
book = []
for _ in range(n):
lam = rng.gammavariate(R, 1.0 / AL)
p = rng.betavariate(A, B)
m = math.exp(rng.gauss(3.0, 1.0))
s1 = [m * math.exp(rng.gauss(-0.08, 0.4))]
s2 = []
t, x, tx = 0.0, 0, 0.0
while True:
t += rng.expovariate(lam)
if t > 104.0:
break
v = m * math.exp(rng.gauss(-0.08, 0.4))
if t <= 52.0:
x, tx = x + 1, t
s1.append(v)
else:
s2.append(v)
if rng.random() < p:
break
book.append((x, tx, s1, math.fsum(s2)))
return book
def hyp2f1(a, b, c, z):
terms, term, k = [1.0], 1.0, 0
while abs(term) > 1e-15 and k < 5000:
term *= (a + k) * (b + k) / ((c + k) * (k + 1)) * z
terms.append(term)
k += 1
return math.fsum(terms)
def expect(x, tx, T, t):
f = hyp2f1(R + x, B + x, A + B + x - 1, t / (AL + T + t))
num = (A + B + x - 1) / (A - 1) * (
1.0 - ((AL + T) / (AL + T + t)) ** (R + x) * f)
den = 1.0
if x > 0:
den += A / (B + x - 1) * ((AL + T) / (AL + tx)) ** (R + x)
return num / den
def top(scores, k):
idx = sorted(range(len(scores)), key=lambda i: (-scores[i], i))
return idx[:k]
if __name__ == "__main__":
rng = random.Random(39933)
book = simulate(2000, rng)
k = 40
y2 = [b[3] for b in book]
total2 = math.fsum(y2)
avgs = [math.fsum(b[2]) / len(b[2]) for b in book]
mbar = math.fsum(avgs) / len(avgs)
rules = {
"year-1 spend": [math.fsum(b[2]) for b in book],
"repeat count": [b[0] + 1e-6 * math.fsum(b[2]) for b in book],
"BG/NBD value": [expect(b[0], b[1], 52.0, 52.0) *
(2.0 * mbar + math.fsum(b[2])) / (2.0 + len(b[2]))
for b in book],
}
truth = set(top(y2, k))
print("top {} of {:,} customers; year-2 revenue {:,.0f}".format(
k, len(book), total2))
print("oracle top-40 share of year-2 revenue {:.3f}".format(
math.fsum(y2[i] for i in truth) / total2))
print("rule precision share of year-2 revenue")
prec = {}
for name in ("year-1 spend", "repeat count", "BG/NBD value"):
pick = top(rules[name], k)
prec[name] = len(truth.intersection(pick)) / k
print("{:<14} {:>9.3f} {:>10.3f}".format(
name, prec[name], math.fsum(y2[i] for i in pick) / total2))
print("BG/NBD gain over year-1 spend {:.3f} (bar for upkeep 0.1)".format(
prec["BG/NBD value"] - prec["year-1 spend"]))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《帕累托鲸鱼客群自动显影、高净值信号自筛选与十倍客单尊享层跃迁母典》第 3 章「谁会是明年的鲸鱼:BG/NBD 与高价值预测」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-399 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026399,
author = {Fan, Yafu},
title = {Pareto Whale Auto-Detection, High-Net-Worth Self-Selection Signals and Ten-X VIP Tier Escalation},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}