Class BoundsOnRatiosInThetaSketchedSets
- java.lang.Object
-
- org.apache.datasketches.thetacommon.BoundsOnRatiosInThetaSketchedSets
-
public final class BoundsOnRatiosInThetaSketchedSets extends Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getEstimateOfBoverA(Sketch sketchA, Sketch sketchB)
Gets the estimate for B over Astatic double
getLowerBoundForBoverA(Sketch sketchA, Sketch sketchB)
Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic double
getUpperBoundForBoverA(Sketch sketchA, Sketch sketchB)
Gets the approximate upper bound for B over A based on a 95% confidence interval
-
-
-
Method Detail
-
getLowerBoundForBoverA
public static double getLowerBoundForBoverA(Sketch sketchA, Sketch sketchB)
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
public static double getUpperBoundForBoverA(Sketch sketchA, Sketch sketchB)
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
-
-