Skip to content

v0.4.1

Choose a tag to compare

@z7743 z7743 released this 04 Sep 05:49
· 9 commits to master since this release

Faster k-NN search and simplex weighted average on both CPU and CUDA (1.3-5 times, depending on shape and device), plus a new moran_matrix(...).

Full Changelog: v0.3.1...v0.4.1

Changes

  • Added moran_matrix(...) to PairwiseCCM, computing Moran's I of target vectors over source k-NN graphs.
  • Improved the k-NN search: matmul-based squared distances in a reusable workspace, with the clamp and square root applied only to the selected neighbors instead of the whole distance block.
  • Replaced the full-block exclusion mask with a sparse one that touches only the columns a query can actually exclude.
  • Reused the neighbor workspace between calls by default: clean_after in score_matrix(...) and predict_matrix(...) now defaults to False, matching the documented behavior (1.5-3 times faster for repeated calls).
  • Improved the simplex weighted average by using embedding_bag for wide target blocks, avoiding a bmm slowdown that affected target embeddings with 5 or more columns (up to ~5 times faster on CPU, ~1.3 times on CUDA).
  • Added a prefiltered neighbor selection on CUDA for libraries above 4096 points (~1.7 times faster for long series).
  • Improved streaming metric accumulation and CUDA simplex batching.
  • Added benchmark scripts and generated CPU/GPU reports (scripts/README_CPU.md, scripts/README_GPU.md).