Files
nexus/wiki/concepts/Population-Stability-Index.md
2026-04-21 00:02:55 +08:00

1.5 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Population Stability Index (PSI) concept
ml-ops
model-metrics
feature-stability
statistical-analysis
2026-04-20

Definition

Population Stability IndexPSI是量化两个分布之间差异的统计指标用于检测特征或模型输出在时间窗口上的分布偏移。

Formula

PSI = Σ ((Actual% - Expected%) * ln(Actual% / Expected%))

使用 Laplace 平滑避免除零:

exp_pct = (expected_counts + 1) / (expected_counts.sum() + bins)
act_pct = (actual_counts + 1) / (actual_counts.sum() + bins)
psi = np.sum((act_pct - exp_pct) * np.log(act_pct / exp_pct))

Interpretation Thresholds

PSI Range Status Action
< 0.10 绿色 无显著偏移
0.100.25 琥珀色 中等偏移,建议调查
≥ 0.25 红色 显著偏移,需要行动

Use Cases

  • Feature Stability Monitoring:监控输入特征在时间窗口上的稳定性
  • Model Drift Detection:检测模型输入输出分布是否发生显著变化
  • Population Shift Detection识别开发样本与OOT样本之间的差异

Applications

  • 每月特征稳定性报告
  • 模型重新训练触发条件
  • 特征工程有效性评估

References