varmodel_calibrate — SPC variation op

• Data kinds: table × video → table

• Call: import fullseye as fs; fs.ledger.varmodel_calibrate(model, good_images, far=None) (to call the implementation directly, import varmodel; varmodel.varmodel_calibrate(model, good_images, far=None); from the registry, opsspc.get("varmodel_calibrate"))

Usage

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).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_good_sample_variation_model — py -3.11 examples/poc_good_sample_variation_model.py

Ops the type connects to (they accept table as input)

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

Same category (variation)

varmodel_alignment · varmodel_band_k · varmodel_fit · varmodel_score


*Provenance: varmodel.py — SPC operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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