feat(theta): add jaccard similarity#142
Open
hawkingrei wants to merge 5 commits into
Open
Conversation
ZENOTME
reviewed
Jul 2, 2026
| } | ||
| } | ||
|
|
||
| fn compute_union<A: ThetaSketchView, B: ThetaSketchView>( |
Contributor
There was a problem hiding this comment.
Looks like we better have union implementation here first.
| } | ||
| } | ||
|
|
||
| fn approximate_lower_bound_on_p(n: u64, k: u64, num_std_devs: f64) -> f64 { |
Contributor
There was a problem hiding this comment.
These are general math function which can be place in bounds_binomial_proportions.rs
Contributor
|
We also miss |
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.
Summary
ThetaJaccardSimilarityfor Theta sketches.theta_jaccard_similarity_test.cppcases.Motivation
This closes one small P0 parity gap with
apache/datasketches-cpp: Rust had Theta sketching and intersection support, but no Jaccard similarity API.Implementation Notes
ThetaIntersectionfor the intersection side.ThetaUnionAPI in this PR.Tests
cargo check -p datasketches --features thetacargo test -p datasketches --features theta --test theta_jaccard_similarity_testcargo test -p datasketches --features theta --lib --test theta_intersection_test --test theta_jaccard_similarity_test --test theta_sketch_testFull
cargo test -p datasketches --features thetacurrently reaches unrelated failures intheta_serialization_testbecause localdatasketches/tests/serialization_test_data/...files are missing.