model op• Data kinds: shapemodel × points → measurement
• Call: import shapestats; shapestats.shape_mahalanobis(model, shape, align: 'bool' = True, cumulative: 'float' = 0.99, n_modes: 'int' = 0) (or opsshapestat.get("shape_mahalanobis"))
> This operator's description has not been translated yet. The original text follows as it is.
モデルから見てその形がどれだけ異常か。→ 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` を正の数で与えればその本数に固定する(比較のため本数を揃えたい
ときに使う)。どちらを使ったかで値が変わるので、報告するときは本数も一緒に。
• shape_statistics family guide
• 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.
• (none yet)
measurement as input)—
model)shape_pca · shape_project · shape_reconstruct · shape_explained_variance · shape_synthesize
*Provenance: shapestats.py — SHAPESTAT 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.