Add USearch as Jaccard backend, update README and noteboooks#20
Merged
Add USearch as Jaccard backend, update README and noteboooks#20
Conversation
USearchIndex.build_from_binary() builds an HNSW index using native bit-vector Jaccard distance (b1x8 dtype). No MinHash encoding needed. Estimator auto-selects backend based on input type: - Dense binary matrix (ndarray/DataFrame) → USearch Jaccard - Sparse matrix (scipy CSR) → MinHash+LSH (avoids densification OOM) - Sets/strings → MinHash+LSH (variable-length data) Also switches transform/add_points to batch queries (was per-point loop). Validation: 0/1 enforcement on build, add, and query; width checks on query; eager failure on load when binary vectors sidecar is missing.
- 13 new USearchIndex binary tests: build, kNN contract, query, add, validation (non-0/1 rejection, wrong width), persistence, pickle - Update estimator tests for USearch routing: relax tie-order assertions, verify sparse CSR stays on LSH path, use set input for MinHash seed test
- docs/usearch_backend.md: how it works, when it's used, performance tables (recall, build time, query time, memory), tuning guide - notebooks/06_metric_guide.ipynb: update summary table for USearch routing - notebooks/12_usearch_jaccard.ipynb: standalone USearch usage + estimator
- README: update pipeline diagram, add USearchIndex standalone examples - api_reference: add kneighbors(), update property docs for index_/lsh_forest_ - notebook 11: kernel metadata update
- Ruff check
Removed unused images from the README.
…utputs when building the KNN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add USearch as Jaccard backend, update README and noteboooks