shape_pca — SHAPESTAT model op

• Data kinds: shapeset → shapemodel

• Call: import fullseye as fs; fs.ledger.shape_pca(shapes, n_components: 'int' = 0, align: 'bool' = True) (implementation को सीधे call करना हो तो import shapestats; shapestats.shape_pca(shapes, n_components: 'int' = 0, align: 'bool' = True), registry से लेना हो तो opsshapestat.get("shape_pca"))

उपयोग

shape PCA (statistical shape model)। → dict (shapemodel)।

लौटाई गई dict: mean (N,3) / components (k, N*3) / variance (k,) / n_points / total_variance / aligned (K,N,3)।

n_components=0 (default) का अर्थ है सभी min(K-1, N*3) components। align=True होने पर पहले generalized_procrustes लगाया जाता है (align किए बिना PCA लेने पर 1 ला principal component "position का अंतर" बन जाता है और shape की बात गायब हो जाती है)।

★ variance sample variance है (K-1 से भाग) । K छोटा हो तो eigenvalues व्यवस्थित रूप से बड़े आते हैं। individuals की संख्या 2 अंकों तक न पहुँचे तब तक eigenvalues से ज़्यादा अनुपात देखें।

★★ align=True "आकार के अंतर" को भी हटा देता है, इसलिए आकार से मिलते-जुलते modes का variance खा जाता है। shape_synth_family में 1 ला mode "लंबे axis का खिंचना-सिकुड़ना" और 2 रा "मुड़ाव" है, weights का अनुपात 0.30 : 0.12 है, इसलिए variance अनुपात का ground truth 6.25 है । मापा गया (K=40, N=80, seed=7):

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

preprocessing var. ratio contribution (1st / 2nd)

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

align=False 6.981 0.8747 / 0.1253

GPA(scaling=False) 6.981 0.8747 / 0.1253

align=True (default) 2.565 0.7188 / 0.2803

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

खिंचाव uniform enlargement से बहुत मिलता है, इसलिए Procrustes का scale हटाना उसका आधे से ज़्यादा हिस्सा ले जाता है। यह गलती नहीं, definition का परिणाम है -- अगर पहले यह तय न किया जाए कि "आकार को trait माना जाए या नहीं", तो उसी data से अलग principal components निकलते हैं। growth या शरीर-बनावट के अंतर को shape की बात में शामिल करना हो तो align=False रखें (या generalized_procrustes(scaling=False) से गुज़ारकर फिर align=False)।

उपयोग की विस्तृत guide

• shape_statistics family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• shapestat_landmark_tour — py -3.11 examples/shapestat_landmark_tour.py

वे अगले ops जिनसे type जुड़ता है (shapemodel को input के रूप में लेते हैं)

shape_project · shape_reconstruct · shape_mahalanobis · shape_explained_variance · shape_synthesize

इसी category के (model)

shape_project · shape_reconstruct · shape_mahalanobis · shape_explained_variance · shape_synthesize


*Provenance: shapestats.py — SHAPESTAT operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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