varmodel_calibrate — SPC variation op

• データ種: table × video → table

• 呼び出し: import fullseye as fs; fs.ledger.varmodel_calibrate(model, good_images, far=None) (実装を直接呼ぶなら import varmodel; varmodel.varmodel_calibrate(model, good_images, far=None)、台帳から引くなら opsspc.get("varmodel_calibrate"))

使い方

Re-derive the band half-width k from held-out good images, for data that break the normal assumption (table).

model is a varmodel_fit table; good_images (m, H, W) are good samples that were NOT used to fit it. Each is scored (varmodel_score, align="translate") and the pooled |z| of all valid pixels gives the empirical (1 - far) quantile, which replaces k (far defaults to the model's declared rate). Defects are never looked at: the threshold still comes from the good distribution, only measured instead of assumed. Real images break the per-pixel independent-normal model (residual misregistration, compression, lighting drift); the closed-form k then under-states the false alarms and this is the honest fix.

Returns a copy of the model with k / lower / upper replaced and k_declared (the closed-form k), k_source = held-out quantile, calibration_n_images, calibration_n_pixels and calibration_far_declared_k (the false-alarm rate the closed-form k actually had on these good images).

Raises ValueError on an empty / malformed / non-finite set, a shape mismatch, a model without the fitted keys, far outside its range, or fewer than 10/far calibration pixels (the quantile would rest on fewer than 10 exceedances).

参考(サンプルデータ・文献)

• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。

• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。

• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。

実行できる例(この op を実際に呼ぶ検証済みサンプル)

• poc_good_sample_variation_model — py -3.11 examples/poc_good_sample_variation_model.py

型が繋がる次の op(table を入力に取れる)

msa_anova_table · msa_gauge_rr · msa_bias_linearity · msa_attribute_agreement · gum_standard_uncertainty · gum_propagate · gum_expanded · gum_monte_carlo

同カテゴリ(variation)

varmodel_alignment · varmodel_band_k · varmodel_fit · varmodel_score


*Provenance: varmodel.py — SPC operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.