Class BoundsOnRatiosInTupleSketchedSets
java.lang.Object
org.apache.datasketches.thetacommon.BoundsOnRatiosInTupleSketchedSets
This class is used to compute the bounds on the estimate of the ratio B / A, where:
- A is a Tuple Sketch of population PopA.
- B is a Tuple or Theta Sketch of population PopB that is a subset of A, obtained by an intersection of A with some other Tuple or Theta Sketch C, which acts like a predicate or selection clause.
- The estimate of the ratio PopB/PopA is BoundsOnRatiosInThetaSketchedSets.getEstimateOfBoverA(A, B).
- The Upper Bound estimate on the ratio PopB/PopA is BoundsOnRatiosInThetaSketchedSets.getUpperBoundForBoverA(A, B).
- The Lower Bound estimate on the ratio PopB/PopA is BoundsOnRatiosInThetaSketchedSets.getLowerBoundForBoverA(A, B).
- Author:
- Kevin Lang, Lee Rhodes, David Cromberge
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Summary>
doublegetEstimateOfBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the estimate for B over Astatic <S extends Summary>
doublegetEstimateOfBoverA
(Sketch<S> sketchA, Sketch<S> sketchB) Gets the estimate for B over Astatic <S extends Summary>
doublegetLowerBoundForBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetLowerBoundForBoverA
(Sketch<S> sketchA, Sketch<S> sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetUpperBoundForBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the approximate upper bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetUpperBoundForBoverA
(Sketch<S> sketchA, Sketch<S> sketchB) Gets the approximate upper bound for B over A based on a 95% confidence interval
-
Method Details
-
getLowerBoundForBoverA
public static <S extends Summary> double getLowerBoundForBoverA(Sketch<S> sketchA, Sketch<S> sketchB) Gets the approximate lower bound for B over A based on a 95% confidence interval- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Tuple sketch B with summary type S- Returns:
- the approximate lower bound for B over A
-
getLowerBoundForBoverA
Gets the approximate lower bound for B over A based on a 95% confidence interval- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Theta sketch B- Returns:
- the approximate lower bound for B over A
-
getUpperBoundForBoverA
public static <S extends Summary> double getUpperBoundForBoverA(Sketch<S> sketchA, Sketch<S> sketchB) Gets the approximate upper bound for B over A based on a 95% confidence interval- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Tuple sketch B with summary type S- Returns:
- the approximate upper bound for B over A
-
getUpperBoundForBoverA
Gets the approximate upper bound for B over A based on a 95% confidence interval- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Theta sketch B- Returns:
- the approximate upper bound for B over A
-
getEstimateOfBoverA
Gets the estimate for B over A- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Tuple sketch B with summary type S- Returns:
- the estimate for B over A
-
getEstimateOfBoverA
Gets the estimate for B over A- Type Parameters:
S
- Summary- Parameters:
sketchA
- the Tuple sketch A with summary type SsketchB
- the Theta sketch B- Returns:
- the estimate for B over A
-