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.