Skip to content

PCA init#24

Open
robertvava wants to merge 9 commits intoHyper3Labs:mainfrom
robertvava:implement/PCA-vis
Open

PCA init#24
robertvava wants to merge 9 commits intoHyper3Labs:mainfrom
robertvava:implement/PCA-vis

Conversation

@robertvava
Copy link

Summary

  • Adds compute_visualization(method="pca") with support for all four geometry combinations: euclidean→euclidean,
    euclidean→poincaré, hyperboloid→euclidean, hyperboloid→poincaré
  • Implements tangent space PCA for hyperbolic embeddings via logmap_0 / expmap_0 on the Lorentz hyperboloid

Mapping strategies

  • euclidean → euclidean: Standard PCA, normalize to [-1, 1]
  • euclidean → poincaré: Standard PCA, tanh scaling into disk, Möbius centering
  • hyperboloid → euclidean: logmap₀ to tangent space, PCA, normalize to [-1, 1]
  • hyperboloid → poincaré: logmap₀, PCA to 2D, expmap₀ back to H², stereographic projection to disk

Tests

  • Added tests covering most related functionality
  • Manual testing: computed PCA + UMAP layouts on CIFAR-10 (500 samples), visually compared in the UI
  • Verified all Poincaré outputs stay inside the unit disk
  • Verified determinism (identical input → identical output)

@mnm-matin
Copy link
Member

Devin Review is available for this pull request.

This link opens the hosted Devin Review page for the current PR.

@robertvava robertvava marked this pull request as ready for review March 8, 2026 18:34
mnm-matin added a commit that referenced this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants