关于「离场风险函数:光标轨迹能预测什么,触屏上还剩什么」,《离场降单与感谢页加购》给出的定量结论是什么?
结论:截断点决定弹层打给谁。截断点取 0.3 时,弹层打中要走的人的比例,也就是召回率,是 0.517;弹出去的层里真正要走的比例,也就是精确率,是 0.495;不走的人里被误弹的比例是 0.114。截断点抬到 0.5,精确率升到 0.667,召回率跌到 0.260,误弹率降到 0.028。再抬到 0.7,精确率 0.792,召回率只剩 0.107,误弹率 0.006。
数据口径:光标轨迹确实带有意图信息,但模型输出的是概率,合成桌面数据上的 AUC 为 0.809,触屏会话失去鼠标信号后降到 0.618。 多巴胺编码的是奖赏预测误差,没有文献证明付款后存在十秒窗口;感谢页上可测的是加购接受率的半衰期,示意参数下估计为 6.50 秒,前 10 秒集中了 0.830 的接受。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.006, 0.028, 0.107, 0.114, 0.260, 0.3
| sessions 4,000 test exit base rate 0.177 | |
| fitted beta | -2.73 +0.94 +0.63 +0.06 +0.72 |
| true beta | -2.60 +0.90 +0.50 +0.06 +0.50 |
| test AUC 0.809 | |
| cut pops precision recall false-pop rate | |
| 0.3 | 370 0.495 0.517 0.114 |
| 0.5 | 138 0.667 0.260 0.028 |
| 0.7 | 48 0.792 0.107 0.006 |
查看完整验算程序
# Chapter 1. p11: an exit-risk logistic model on synthetic cursor tracks.
# Model: each desktop session snapshot has four signals: cursor speed
# toward the top bar (v_up), upward acceleration (a_up), idle seconds
# (idle) and scroll stall (stall, 1 if no scroll for 5 s). The true
# chance of leaving within 2 s is logistic in these signals. We fit
# the model on half the data by Newton steps (IRLS) and score the other
# half: AUC, then precision, recall and false-pop rate at 3 cut-offs.
# All coefficients are illustrative; replace them with your own logs.
import math
import random
rng = random.Random(39811)
TRUE = [-2.6, 0.9, 0.5, 0.06, 0.5]
def sigmoid(z):
if z < -30.0:
return 0.0
if z > 30.0:
return 1.0
return 1.0 / (1.0 + math.exp(-z))
def make(n):
rows = []
for _ in range(n):
v_up = rng.gauss(0.0, 1.0)
a_up = 0.5 * v_up + rng.gauss(0.0, 0.9)
idle = rng.expovariate(1.0 / 6.0)
stall = 1.0 if rng.random() < 0.35 else 0.0
x = [1.0, v_up, a_up, idle, stall]
z = math.fsum(b * f for b, f in zip(TRUE, x))
y = 1 if rng.random() < sigmoid(z) else 0
rows.append((x, y))
return rows
def solve(a, b):
n = len(b)
m = [row[:] + [b[i]] for i, row in enumerate(a)]
for c in range(n):
piv = max(range(c, n), key=lambda r: abs(m[r][c]))
m[c], m[piv] = m[piv], m[c]
for r in range(n):
if r != c:
f = m[r][c] / m[c][c]
m[r] = [u - f * w for u, w in zip(m[r], m[c])]
return [m[i][n] / m[i][i] for i in range(n)]
def irls(rows, k, steps=12):
beta = [0.0] * k
for _ in range(steps):
grad = [0.0] * k
hess = [[0.0] * k for _ in range(k)]
gterms = [[] for _ in range(k)]
hterms = [[[] for _ in range(k)] for _ in range(k)]
for x, y in rows:
p = sigmoid(math.fsum(b * f for b, f in zip(beta, x)))
w = p * (1.0 - p)
for i in range(k):
gterms[i].append((y - p) * x[i])
for j in range(k):
hterms[i][j].append(w * x[i] * x[j])
for i in range(k):
grad[i] = math.fsum(gterms[i])
for j in range(k):
hess[i][j] = math.fsum(hterms[i][j])
step = solve(hess, grad)
beta = [b + s for b, s in zip(beta, step)]
return beta
def auc(scores, labels):
pairs = sorted(zip(scores, labels))
rank_sum, n1 = 0, 0
for r, (_, y) in enumerate(pairs, 1):
if y == 1:
rank_sum += r
n1 += 1
n0 = len(pairs) - n1
return (rank_sum - n1 * (n1 + 1) / 2.0) / (n1 * n0)
data = make(4000)
train, test = data[:2000], data[2000:]
beta = irls(train, 5)
scores = [sigmoid(math.fsum(b * f for b, f in zip(beta, x)))
for x, _ in test]
labels = [y for _, y in test]
base = math.fsum(labels) / len(labels)
print("sessions {:,} test exit base rate {:.3f}".format(len(data), base))
print("fitted beta: " + " ".join("{:+.2f}".format(b) for b in beta))
print("true beta: " + " ".join("{:+.2f}".format(b) for b in TRUE))
print("test AUC {:.3f}".format(auc(scores, labels)))
print("cut pops precision recall false-pop rate")
for cut in (0.3, 0.5, 0.7):
tp = fp = fn = tn = 0
for s, y in zip(scores, labels):
if s >= cut:
tp, fp = tp + y, fp + (1 - y)
else:
fn, tn = fn + y, tn + (1 - y)
print("{:.1f} {:5d} {:9.3f} {:6.3f} {:14.3f}".format(
cut, tp + fp, tp / max(1, tp + fp), tp / max(1, tp + fn),
fp / max(1, fp + tn)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《离场轨迹微降单挽留、零门槛诱饵捕获与付款成功页黄金十秒连带母典》第 1 章「离场风险函数:光标轨迹能预测什么,触屏上还剩什么」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-398 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026398,
author = {Fan, Yafu},
title = {Exit-Trajectory Micro-Downsells, Zero-Friction Lead Magnet Capture and Thank-You-Page Ten-Second Monetisation},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}