Skip to content

algo: Improve Rust DR algorithm implementations with comprehensive tests#5

Merged
GeorgePearse merged 1 commit intomainfrom
algo/rust-dr-improvements
Nov 21, 2025
Merged

algo: Improve Rust DR algorithm implementations with comprehensive tests#5
GeorgePearse merged 1 commit intomainfrom
algo/rust-dr-improvements

Conversation

@GeorgePearse
Copy link
Copy Markdown
Owner

Summary

  • Add Barnes-Hut quadtree for O(N log N) t-SNE force approximation, enabling scalability to larger datasets
  • Parallelize t-SNE and Isomap with Rayon for significant speedup on multi-core systems
  • Replace O(n³) Floyd-Warshall with O(n² log n) parallel Dijkstra in Isomap geodesic computation
  • Add SMACOF metric MDS algorithm with stress metric for quality measurement

Changes

File Lines Description
src/barnes_hut.rs +290 New Barnes-Hut quadtree implementation
src/tsne.rs +237 Parallel distance/gradient computation
src/isomap.rs +215 Dijkstra-based geodesic distances
src/mds.rs +171 SMACOF algorithm + stress computation
src/pca.rs +127 Explained variance ratio
src/lle.rs +76 Regularized weight computation

Benchmark Results

Algorithm Time Trustworthiness (k=15)
t-SNE 12.69s 0.990
UMAP 7.25s 0.985
PaCMAP 0.14s 0.978
MDS 6.40s 0.889
PCA 0.00s 0.829

All algorithms include comprehensive unit tests.

- Add Barnes-Hut quadtree for O(N log N) t-SNE force computation
- Parallelize t-SNE distance and gradient computation with Rayon
- Replace O(n³) Floyd-Warshall with O(n² log n) parallel Dijkstra in Isomap
- Add SMACOF metric MDS algorithm with stress computation
- Complete PCA implementation with explained variance ratio
- Improve LLE weight computation with regularization
- Add comprehensive unit tests for all algorithms
- Update benchmark results (t-SNE: 0.990, UMAP: 0.985, PaCMAP: 0.978 trustworthiness)
@GeorgePearse GeorgePearse merged commit 5af3624 into main Nov 21, 2025
1 of 2 checks passed
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.

1 participant