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(TupleSketch<S> sketchA, ThetaSketch sketchB) Gets the estimate for B over Astatic <S extends Summary>
doublegetEstimateOfBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB) Gets the estimate for B over Astatic <S extends Summary>
doublegetLowerBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetLowerBoundForBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetUpperBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB) Gets the approximate upper bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doublegetUpperBoundForBoverA(TupleSketch<S> sketchA, TupleSketch<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(TupleSketch<S> sketchA, TupleSketch<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
public static <S extends Summary> double getLowerBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch 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 Theta sketch B- Returns:
- the approximate lower bound for B over A
-
getUpperBoundForBoverA
public static <S extends Summary> double getUpperBoundForBoverA(TupleSketch<S> sketchA, TupleSketch<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
public static <S extends Summary> double getUpperBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch 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 Theta sketch B- Returns:
- the approximate upper bound for B over A
-
getEstimateOfBoverA
public static <S extends Summary> double getEstimateOfBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB) 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
public static <S extends Summary> double getEstimateOfBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB) 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
-