关于「排序即求评:货架反馈环、探索代价与前五条评论」,《星级自选择与贝叶斯排序》给出的定量结论是什么?
结论:排序键也是求评策略。在示意货架上,贝塔后验均值损失 85.8 单、检验 6.12 件商品;威尔逊下界最保守,只检验 3.00 件,损失 118.8 单;汤普森抽样检验 18.38 件,短期损失 131.6 单。前 5 条评论把自身数据权重提高到 0.333,第 6 至 50 条只再加 0.500,所以求评资源应优先给评论不足 5 条的商品。评分会不会像排序一样,因为互相参照而整体漂移?第六章讨论评分通胀。
数据口径:书中的顾客、商品与参数均为示意模型;全部计算由书中程序生成;本书是非个人化的经营参考,不是针对具体店铺的经营建议,也不是法律意见,书中提到的法规以上架前人工复核为准;本书反对一切刷单、购买评论与筛选式求评。 第一章用「购买偏差加少报偏差」的两段筛子解释评论星级的 J 型分布,示意参数下购买偏差使均值上移 +0.532 星。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 118.8, 131.6, 18.38, 3.00, 6.12, 85.8
| 6000 shoppers, 40 listings, mean of 8 shelves (illustrative) | |||
| policy | bought | regret listings>=7 | |
| raw | 1457.8 | 101.5 | 13.25 |
| wilson | 1440.4 | 118.8 | 3.00 |
| bayes | 1473.4 | 85.8 | 6.12 |
| thompson | 1427.6 | 131.6 | 18.38 |
| oracle | 1559.2 | 0.0 | - |
查看完整验算程序
# Chapter 5. p51: the sort key is also a review-collection policy.
# Shelf of 40 listings, true positive share p ~ Beta(8, 2), mean 0.8
# (illustrative);
# each listing starts with 2 seeded reviews drawn from its own p.
# Each round one shopper sees the top 3 slots with view probabilities
# 1.0, 0.6, 0.35, buys a viewed item with prob 0.15 p_j (the first
# purchase ends the visit); a buyer reviews with prob 0.3, positive with
# prob p_j.
# Policies: raw share, Wilson LB, Beta posterior mean, Thompson sampling
# (rank by one draw from each Beta posterior). 6000 rounds, 8 shelves.
# Regret = purchases lost against always showing the true best three.
import math
import random
Z = 1.959964
A0, B0 = 8.0, 2.0
VIEW = (1.0, 0.6, 0.35)
ROUNDS, SHELVES, N_ITEMS = 6000, 8, 40
BUY, REVIEW = 0.15, 0.3
def wilson_lb(k, n):
p = k / n
a = p + Z * Z / (2 * n)
b = Z * math.sqrt(p * (1 - p) / n + Z * Z / (4 * n * n))
return (a - b) / (1 + Z * Z / n)
def oracle_rate(ps):
top = sorted(ps, reverse=True)[:3]
miss, rate = 1.0, 0.0
for v, p in zip(VIEW, top):
rate += miss * v * BUY * p
miss *= 1 - v * BUY * p
return rate
def run(rng, ps, policy):
k = [0] * N_ITEMS
n = [0] * N_ITEMS
for j in range(N_ITEMS):
for _ in range(2):
n[j] += 1
k[j] += 1 if rng.random() < ps[j] else 0
bought = 0
for _ in range(ROUNDS):
if policy == "thompson":
key = [rng.betavariate(k[j] + A0, n[j] - k[j] + B0)
for j in range(N_ITEMS)]
elif policy == "raw":
key = [k[j] / n[j] for j in range(N_ITEMS)]
elif policy == "wilson":
key = [wilson_lb(k[j], n[j]) for j in range(N_ITEMS)]
else:
key = [(k[j] + A0) / (n[j] + A0 + B0) for j in range(N_ITEMS)]
order = sorted(range(N_ITEMS), key=lambda j: (-key[j], j))[:3]
for v, j in zip(VIEW, order):
if rng.random() < v and rng.random() < BUY * ps[j]:
bought += 1
if rng.random() < REVIEW:
n[j] += 1
k[j] += 1 if rng.random() < ps[j] else 0
break
reviewed = len([j for j in range(N_ITEMS) if n[j] >= 7])
return bought, reviewed
rng = random.Random(20261112)
shelves = [[rng.betavariate(A0, B0) for _ in range(N_ITEMS)]
for _ in range(SHELVES)]
best = math.fsum(oracle_rate(ps) * ROUNDS for ps in shelves) / SHELVES
print("6000 shoppers, 40 listings, mean of 8 shelves (illustrative)")
print("%-10s %9s %9s %11s" % ("policy", "bought", "regret",
"listings>=7"))
for pol in ("raw", "wilson", "bayes", "thompson"):
b, r = [], []
for ps in shelves:
x, y = run(rng, ps, pol)
b.append(x)
r.append(y)
mb = math.fsum(b) / SHELVES
print("%-10s %9.1f %9.1f %11.2f" % (pol, mb, best - mb,
math.fsum(r) / SHELVES))
print("%-10s %9.1f %9.1f %11s" % ("oracle", best, 0.0, "-"))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《评论星级J型自选择偏差、贝叶斯平均排序与九品中正评级通胀母典》第 5 章「排序即求评:货架反馈环、探索代价与前五条评论」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-212 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026212,
author = {Fan, Yafu},
title = {J-Shaped Self-Selection in Star Ratings, Bayesian-Average Ranking and Rating Inflation from the Nine-Rank System to Online Marketplaces},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}