Combine two theta() sketches into a new compact theta_sketch result,
without mutating either input. a and b must be Theta sketches created
with the same seed (a mismatch raises datasketches_seed_mismatch).
Usage
theta_union(a, b, lg_k = NULL)
theta_intersection(a, b)
theta_difference(a, b)
theta_jaccard(a, b)Value
A compact theta_sketch object (theta_union(),
theta_intersection(), theta_difference()), or a named numeric vector
c(lower_bound, estimate, upper_bound) (theta_jaccard()).
Details
theta_union(a, b)estimates the size of the unionunion(A, B).theta_intersection(a, b)estimates the size of the intersectionintersection(A, B).theta_difference(a, b)estimates the size of the set differenceA \\ B(elements inAbut notB).theta_jaccard(a, b)estimates the Jaccard similarity indexJ(A, B) = |intersection(A, B)| / |union(A, B)|, returning a named numeric vectorc(lower_bound, estimate, upper_bound)for a ~95% confidence interval.