Skip to content

Add PaCMAP and LocalMAP dimensionality reduction algorithms#49

Open
patcon wants to merge 4 commits intosaehm:masterfrom
patcon:add-pacmap-support
Open

Add PaCMAP and LocalMAP dimensionality reduction algorithms#49
patcon wants to merge 4 commits intosaehm:masterfrom
patcon:add-pacmap-support

Conversation

@patcon
Copy link
Copy Markdown

@patcon patcon commented Apr 14, 2026

Closes #48

Summary

  • Implements PaCMAP (Pairwise Controlled Manifold Approximation Projection) and LocalMAP as new DR algorithms, following the existing UMAP/TriMap stylistic patterns
  • PaCMAP uses three explicit pair types (nearest-neighbor, mid-near, further) with a dynamic three-phase weight schedule and Adam optimization; initialized via PCA
  • LocalMAP extends PaCMAP with embedding-space FP pair resampling in phase 3 for sharper local cluster separation
  • Both algorithms are exported from the main package, have 17 new tests (9 for PaCMAP, 8 for LocalMAP) with full coverage across Node + Chromium + Firefox + WebKit via Playwright, and include VitePress doc pages with live IRIS visualizations
  • All existing 1460 tests continue to pass

Reference

Test plan

  • PaCMAP and LocalMAP unit tests pass across Node and all three browser environments
  • Full test suite (1460 tests) passes with no regressions
  • npm run build succeeds with no new type errors
  • Doc pages render live IRIS scatter plots via the showcase grid

🤖 Generated with Claude Code (~200 words of PR description from ~230 words of human prompts across this session)

patcon and others added 4 commits April 13, 2026 21:50
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ports the Python PaCMAP implementation to JavaScript, following the
existing UMAP/TriMap stylistic patterns. PaCMAP uses three explicit
pair types (NN, MN, FP) with a dynamic three-phase weight schedule
and Adam optimization. LocalMAP extends PaCMAP with embedding-space
FP resampling in phase 3 for sharper local cluster separation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updates all doc pages that list or reference UMAP as a representative
DR algorithm to also include PaCMAP and LocalMAP, and adds a cross-
reference from the UMAP page to its newer alternatives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patcon
Copy link
Copy Markdown
Author

patcon commented Apr 14, 2026

Ah shoot, the CLAUDE.md was accidentally committed here, but if you dislike that, I can remove it (it just helps people using these tools to save tokens)

Anyhow, I'm very happy to discuss or learn that such PRs are not welcome -- I've been using them for my own side-projects, but am new to how etiquette is developing for contributors, and this is my first go at that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding support for PaCMAP/LocalMAP

1 participant