shape_pca — SHAPESTAT model op

Data kinds: shapesetshapemodel

Call: import shapestats; shapestats.shape_pca(shapes, n_components: 'int' = 0, align: 'bool' = True) (or opsshapestat.get("shape_pca"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

形態 PCA(統計形状モデル)。→ dict(`shapemodel`)。

返す辞書: `mean (N,3) / components (k, N*3) / variance`

`(k,) / n_points / total_variance / aligned (K,N,3)`。

`n_components=0(既定)は min(K-1, N*3)` 本すべて。

`align=True なら先に :func:generalized_procrustes` を掛ける

(揃えずに PCA を取ると、第 1 主成分が「位置の違い」になって形の話が消える)。

★ **分散は標本分散(`K-1` で割る)**。K が小さいと固有値は系統的に大きく

出る。個体数が二桁に届かないうちは、固有値そのものよりを見ること。

★★ **`align=True` は「大きさの違い」も消すので、大きさに近いモードの分散を

食う。** :func:shape_synth_family は第 1 モードを「長軸の伸び縮み」、第 2 を

「曲げ」にしてあり、重みの比は 0.30 : 0.12 なので分散比の真値は 6.25

実測(K=40、N=80、seed=7):

========================== ========== ======================

前処理 分散比 寄与率(第 1 / 第 2)

========================== ========== ======================

`align=False` 6.981 0.8747 / 0.1253

GPA(`scaling=False`) 6.981 0.8747 / 0.1253

`align=True`(既定) 2.565 0.7188 / 0.2803

========================== ========== ======================

伸びは一様拡大とよく似ているので、Procrustes のスケール除去がその半分以上を

持っていく。間違いではなく定義の帰結 —— 「大きさを形質に数えるか」を

先に決めていないと、同じデータから違う主成分が出る。成長や体格差を形の話に

含めたいなら `align=False(または generalized_procrustes(scaling=False)`

を通してから `align=False`)にすること。

Detailed usage guide

shape_statistics family guide

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)

• (none yet)

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

shape_project · shape_reconstruct · shape_mahalanobis · shape_explained_variance · shape_synthesize

Same category (model)

shape_project · shape_reconstruct · shape_mahalanobis · 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.