public final class JaccardSimilarity extends Object
Note: only retained hash values are compared, and the Tuple summary values are not accounted for in the similarity measure.
Constructor and Description |
---|
JaccardSimilarity() |
Modifier and Type | Method and Description |
---|---|
static <S extends Summary> |
dissimilarityTest(Sketch<S> measured,
Sketch<S> expected,
SummarySetOperations<S> summarySetOps,
double threshold)
Tests dissimilarity of a measured Sketch against an expected Sketch.
|
static <S extends Summary> |
dissimilarityTest(Sketch<S> measured,
Sketch expected,
S summary,
SummarySetOperations<S> summarySetOps,
double threshold)
Tests dissimilarity of a measured Sketch against an expected Sketch.
|
static <S extends Summary> |
exactlyEqual(Sketch<S> sketchA,
Sketch<S> sketchB,
SummarySetOperations<S> summarySetOps)
Returns true if the two given sketches have exactly the same hash values and the same
theta values.
|
static <S extends Summary> |
exactlyEqual(Sketch<S> sketchA,
Sketch sketchB,
S summary,
SummarySetOperations<S> summarySetOps)
Returns true if the two given sketches have exactly the same hash values and the same
theta values.
|
static <S extends Summary> |
jaccard(Sketch<S> sketchA,
Sketch<S> sketchB,
SummarySetOperations<S> summarySetOps)
Computes the Jaccard similarity index with upper and lower bounds.
|
static <S extends Summary> |
jaccard(Sketch<S> sketchA,
Sketch sketchB,
S summary,
SummarySetOperations<S> summarySetOps)
Computes the Jaccard similarity index with upper and lower bounds.
|
static <S extends Summary> |
similarityTest(Sketch<S> measured,
Sketch<S> expected,
SummarySetOperations<S> summarySetOps,
double threshold)
Tests similarity of a measured Sketch against an expected Sketch.
|
static <S extends Summary> |
similarityTest(Sketch<S> measured,
Sketch expected,
S summary,
SummarySetOperations<S> summarySetOps,
double threshold)
Tests similarity of a measured Sketch against an expected Sketch.
|
public static <S extends Summary> double[] jaccard(Sketch<S> sketchA, Sketch<S> sketchB, SummarySetOperations<S> summarySetOps)
Note: For very large pairs of sketches, where the configured nominal entries of the sketches are 2^25 or 2^26, this method may produce unpredictable results.
S
- SummarysketchA
- The first argument, a Tuple sketch with summary type SsketchB
- The second argument, a Tuple sketch with summary type SsummarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.public static <S extends Summary> double[] jaccard(Sketch<S> sketchA, Sketch sketchB, S summary, SummarySetOperations<S> summarySetOps)
Note: For very large pairs of sketches, where the configured nominal entries of the sketches are 2^25 or 2^26, this method may produce unpredictable results.
S
- SummarysketchA
- The first argument, a Tuple sketch with summary type SsketchB
- The second argument, a Theta sketchsummary
- the given proxy summary for the theta sketch, which doesn't have one.
This may not be null.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.public static <S extends Summary> boolean exactlyEqual(Sketch<S> sketchA, Sketch<S> sketchB, SummarySetOperations<S> summarySetOps)
S
- SummarysketchA
- The first argument, a Tuple sketch with summary type SsketchB
- The second argument, a Tuple sketch with summary type SsummarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.public static <S extends Summary> boolean exactlyEqual(Sketch<S> sketchA, Sketch sketchB, S summary, SummarySetOperations<S> summarySetOps)
S
- SummarysketchA
- The first argument, a Tuple sketch with summary type SsketchB
- The second argument, a Theta sketchsummary
- the given proxy summary for the theta sketch, which doesn't have one.
This may not be null.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.public static <S extends Summary> boolean similarityTest(Sketch<S> measured, Sketch<S> expected, SummarySetOperations<S> summarySetOps, double threshold)
S
- Summarymeasured
- a Tuple sketch with summary type S to be testedexpected
- the reference Tuple sketch with summary type S that is considered to be correct.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.threshold
- a real value between zero and one.public static <S extends Summary> boolean similarityTest(Sketch<S> measured, Sketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold)
S
- Summarymeasured
- a Tuple sketch with summary type S to be testedexpected
- the reference Theta sketch that is considered to be correct.summary
- the given proxy summary for the theta sketch, which doesn't have one.
This may not be null.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.threshold
- a real value between zero and one.public static <S extends Summary> boolean dissimilarityTest(Sketch<S> measured, Sketch<S> expected, SummarySetOperations<S> summarySetOps, double threshold)
S
- Summarymeasured
- a Tuple sketch with summary type S to be testedexpected
- the reference Theta sketch that is considered to be correct.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.threshold
- a real value between zero and one.public static <S extends Summary> boolean dissimilarityTest(Sketch<S> measured, Sketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold)
S
- Summarymeasured
- a Tuple sketch with summary type S to be testedexpected
- the reference Theta sketch that is considered to be correct.summary
- the given proxy summary for the theta sketch, which doesn't have one.
This may not be null.summarySetOps
- instance of SummarySetOperations used to unify or intersect summaries.threshold
- a real value between zero and one.Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.