model op• 資料種類:shapemodel × points → measurement
• 呼叫: import fullseye as fs; fs.ledger.shape_mahalanobis(model, shape, align: 'bool' = True, cumulative: 'float' = 0.99, n_modes: 'int' = 0)(要直接呼叫實作,import shapestats; shapestats.shape_mahalanobis(model, shape, align: 'bool' = True, cumulative: 'float' = 0.99, n_modes: 'int' = 0);從台帳取用則 opsshapestat.get("shape_mahalanobis"))
從模型來看該形狀有多異常。→ float。
把 sqrt(sum(score_i^2 / variance_i)) 僅限於前幾個成分相加。
★ 不可把全部成分相加。 由 K 個個體組成的群體得出的主成分有 K-1 個,但越往後變異數會降到數值上的零。實測(K=12、N=80、真實模態為 2 個)的變異數: 3.2e-02, 5.6e-03, 4.0e-05, 6.7e-13, 9.7e-14, 9.9e-17, …, 1.0e-31。除以這條尾巴,值就失去了意義:
========== =========== ==================
使用個數 群內個體 注入 0.5 的鼓起
========== =========== ==================
1 0.428 1.821
2 0.885 2.617
3 1.035 18.134
5 1.373 1393035.060
11(全部) 46613.636 9.3e+13
========== =========== ==================
用 5 個時群內個體為 1.37,離群者卻達 100 萬;用 11 個時連群內都是 46614。量到的不是「異常度」,而是「除以數值零的次數」。
因此預設只使用累積貢獻率 cumulative(0.99)以內的成分。上面的群體中選出 2 個(0.99895),群內 0.885 / 離群 2.617 排列得很自然。若給 n_modes 一個正數,則固定為該個數(為比較而想統一個數時使用)。使用哪一種會改變值,因此報告時請連同個數一起給出。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• shapestat_landmark_tour — py -3.11 examples/shapestat_landmark_tour.py
measurement 作為輸入)—
model)shape_pca · shape_project · shape_reconstruct · shape_explained_variance · shape_synthesize
*Provenance: shapestats.py — SHAPESTAT 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.