关于「像素冷启动,汤普森抽样」,《暗投授权与钩子归因》给出的定量结论是什么?
结论:第四章用汤普森抽样做冷启动,三千点击后挑对最优素材比例只有 0.765。
数据口径:书中参数均为示意,全部计算由书中程序生成;本书是非个人化经营分析,不构成经营或法律建议。 第六章用二叉树为跳单期权定价,合理预估 20.82 已拦住示意模型中全部跳单。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.765
| oracle orders 90; 200 runs of 3,000 clicks | ||||
| policy | mean orders | regret | clicks on best | final pick best |
| split | 73.36 | 16.64 | 0.333 | 0.710 |
| commit | 77.21 | 12.79 | 0.393 | 0.400 |
| thompson | 78.00 | 12.00 | 0.520 | 0.765 |
查看完整验算程序
# Chapter 4. p41: cold start of three licensed hooks, three policies.
# Three creatives convert a click with probability 0.020, 0.024 and
# 0.030 (illustrative). Each run spends 3,000 clicks.
# split round robin, 1,000 clicks each
# commit 300 test clicks (100 each), then all on the leader
# thompson Beta(1, 1) priors; each click goes to the arm whose
# posterior draw is largest (Thompson 1933)
# 200 runs with a fixed seed; regret is measured against always
# using the best creative (expected 90 orders).
import math
import random
P = (0.020, 0.024, 0.030)
CLICKS, RUNS = 3000, 200
rng = random.Random(1933)
def split():
s = [0, 0, 0]
won = 0
for c in range(CLICKS):
a = c % 3
if rng.random() < P[a]:
s[a] += 1
won += 1
lead = max(range(3), key=lambda i: (s[i], -i))
return won, CLICKS // 3, lead
def commit():
s = [0, 0, 0]
won = 0
for c in range(300):
a = c % 3
if rng.random() < P[a]:
s[a] += 1
won += 1
lead = max(range(3), key=lambda i: (s[i], -i))
for _ in range(CLICKS - 300):
if rng.random() < P[lead]:
won += 1
on_best = 100 + (CLICKS - 300 if lead == 2 else 0)
return won, on_best, lead
def thompson():
s, f = [1, 1, 1], [1, 1, 1]
won, on_best = 0, 0
for _ in range(CLICKS):
draws = [rng.betavariate(s[i], f[i]) for i in range(3)]
a = max(range(3), key=lambda i: draws[i])
if a == 2:
on_best += 1
if rng.random() < P[a]:
s[a] += 1
won += 1
else:
f[a] += 1
lead = max(range(3), key=lambda i: s[i] / (s[i] + f[i]))
return won, on_best, lead
if __name__ == "__main__":
oracle = CLICKS * P[2]
print("oracle orders {:.0f}; {} runs of {:,} clicks".format(
oracle, RUNS, CLICKS))
print(" policy mean orders regret clicks on best"
" final pick best")
for name, pol in (("split", split), ("commit", commit),
("thompson", thompson)):
wins, best, right = [], [], 0
for _ in range(RUNS):
w, b, lead = pol()
wins.append(w)
best.append(b)
if lead == 2:
right += 1
mw = math.fsum(wins) / RUNS
mb = math.fsum(best) / RUNS / CLICKS
print(" {:<8} {:>11.2f} {:>6.2f} {:>14.3f} {:>15.3f}"
.format(name, mw, oracle - mw, mb, right / RUNS))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《暗投白名单授权经济学、三秒钩子生存分析与单层星探归因博弈母典》第 4 章「像素冷启动,汤普森抽样」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-333 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026333,
author = {Fan, Yafu},
title = {Dark-Ads Whitelist Licensing Economics, Three-Second Hook Survival Analysis and Single-Tier Scout Attribution Games},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}