Class BoundsOnRatiosInThetaSketchedSets
java.lang.Object
org.apache.datasketches.thetacommon.BoundsOnRatiosInThetaSketchedSets
This class is used to compute the bounds on the estimate of the ratio B / A, where:
- A is a Theta Sketch of population PopA.
- B is a Theta Sketch of population PopB that is a subset of A, obtained by an intersection of A with some other 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetEstimateOfBoverA(ThetaSketch sketchA, ThetaSketch sketchB) Gets the estimate for B over Astatic doublegetLowerBoundForBoverA(ThetaSketch sketchA, ThetaSketch sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic doublegetUpperBoundForBoverA(ThetaSketch sketchA, ThetaSketch sketchB) Gets the approximate upper bound for B over A based on a 95% confidence interval
-
Method Details
-
getLowerBoundForBoverA
Gets the approximate lower bound for B over A based on a 95% confidence interval- Parameters:
sketchA- the sketch AsketchB- the sketch B- Returns:
- the approximate lower bound for B over A
-
getUpperBoundForBoverA
Gets the approximate upper bound for B over A based on a 95% confidence interval- Parameters:
sketchA- the sketch AsketchB- the sketch B- Returns:
- the approximate upper bound for B over A
-
getEstimateOfBoverA
Gets the estimate for B over A- Parameters:
sketchA- the sketch AsketchB- the sketch B- Returns:
- the estimate for B over A
-