第9章 指标、区间与门(对齐判定)


I. 目标与范围(Purpose & Scope)


II. 输入与依赖(Inputs & Dependencies)


III. 指标集(Metrics Set)


IV. 区间与覆盖(Intervals & Coverage)

  1. 模式三选一并全卷一致
    • k 覆盖:U = k·u_c;
    • alpha 置信:t_{ν,1−α/2} 或正态近似;
    • quantile[p_lo,p_hi](如 [0.025, 0.975])。
  2. 报告要求:所有关键指标均给点估计 + 区间;图表以误差棒/带显示并在图注标明覆盖模式与参数。
  3. 小样本自由度:Δ法用 Welch–Satterthwaite 估计自由度。

V. 对齐判定与容忍(Alignment & Tolerances)


VI. 路径量统一口径(Normative Path Forms)

判定前按“时间→路径→相位”对齐;len(gamma_ell)=len(d_ell)=len(n_eff)≥2;delta_form 回显;维度闭合 p_dim = 1.0。


VII. 门阈映射与决策(Gate Mapping & Decision)

  1. G1 Schema 完整|G2 引用合规|G3 路径规范|G4 量纲闭合|G5 新鲜度|G6 覆盖一致|G7 协方差一致|G8 唯一性与无环。
  2. 阈值示例(与《误差预算卡》/《模型卡》一致):
    • |ΔT_arr| + U(T_arr) ≤ τ_T;
    • LB(r_phi) ≥ r_phi_min;
    • P95(ε_flux) ≤ ε_flux_guard;
    • Latency_P95 ≤ SLA、Throughput ≥ SLO。
  3. 放行规则:核心门通过且所有关键指标“点 + 区间”满足阈值 → Pass;否则 Fail / [Restricted](仅定性呈现)。

VIII. 机读规格(Machine-Readable Specs)
A. eval/compare_spec.yaml

version: "1.0.0"

coverage: { mode: "k", k: 2 } # k|alpha|quantile

metrics:

mae: { tolerance: 1.0e-4 }

auc: { tolerance: 2.0e-3 }

r_phi:{ lb95_min: 0.60 }

delta_t_arr_s: { guard: "tau_T_s" }

epsilon_flux_p95: { guard: 0.02 }

latency_p95_s: { guard: 0.200 }

rules:

interval_overlap_required: true

same_coverage_band_required: true


B. reports/validate_report.json(节选)

JSON json
{
  "gates": {
    "G1": true,
    "G2": 0.94,
    "G3": true,
    "G4": true,
    "G5": true,
    "G6": true,
    "G7": true,
    "G8": true
  },
  "metrics": {
    "MAE": { "ref": 0.0123, "repro": 0.0124, "within_tol": true },
    "Latency_P95_s": { "ref": 0.182, "repro": 0.188, "within_guard": true }
  },
  "intervals": { "r_phi": { "ref": [ 0.61, 0.8 ], "repro": [ 0.62, 0.79 ], "overlap": true } },
  "decision": "pass"
}

C. 图表导出:figs/metric_curves.{pdf,png}、figs/interval_bands.{svg,png},图注含单位与覆盖模式。


IX. 反例与修正(Anti-Patterns & Fixes)


X. 交叉引用(Cross-References)


XI. 勾选清单(Checklist)