spc_mt_distance — SPC mt op

• 資料種類:matrix → table

• 呼叫: import fullseye as fs; fs.ledger.spc_mt_distance(data, mean=None, std=None, inv_corr=None, threshold=3.0)(要直接呼叫實作,import spc; spc.spc_mt_distance(data, mean=None, std=None, inv_corr=None, threshold=3.0);從台帳取用則 opsspc.get("spc_mt_distance"))

用法

> 該運算子的說明尚無譯文,以下照原文給出。

Score observations against an MT-method unit space.

`data is a 2-D array of shape (m, p). Pass the mean, std` and

`inv_corr from :func:spc_mt_unit_space` to score new product against a

stored unit space; omit all three and the unit space is built from `data`

itself, which is the training case and makes `md_sq_mean` land on

`(m-1)/m`.

Each row's distance is `MD_i = sqrt(z_i' R^-1 z_i / p)` with

`z_i = (x_i - mean) / std. Rows with MD > threshold` are reported in

`flagged; the rest in inside. Dividing the quadratic form by p` is

what puts the unit space at 1 regardless of how many features are used, so a

threshold carries over when features are added or removed.

Returns a dict with the per-row `md and md_sq arrays, flagged`,

`inside, the threshold, md_sq_mean, and n/p`.

Relationship to :func:spc_hotelling_t2 (used as the oracle in the tests):

on the standardised matrix the covariance *is* the correlation, so

`md**2 == t2 / p` exactly for the same data.

Raises `ValueError`: a non-2-D / empty *data*, a non-positive

`threshold, a unit space given only in part, a mean / std` /

`inv_corr whose shape disagrees with p`, a non-positive entry in

`std`, or non-finite input.

參考(範例資料・文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者・年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• poc_mt_hidden_fault — py -3.11 examples/poc_mt_hidden_fault.py

• poc_spc — py -3.11 examples/poc_spc.py

型別可銜接的下一個運算子(可接受 table 作為輸入)

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

同類別(mt)

spc_mt_unit_space · spc_mt_sn_ratio


*Provenance: spc.py — SPC 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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