Package org.apache.datasketches.hive.cpc
Class GetEstimateAndErrorBoundsUDF
- java.lang.Object
-
- org.apache.hadoop.hive.ql.exec.UDF
-
- org.apache.datasketches.hive.cpc.GetEstimateAndErrorBoundsUDF
-
public class GetEstimateAndErrorBoundsUDF extends org.apache.hadoop.hive.ql.exec.UDF
-
-
Constructor Summary
Constructors Constructor Description GetEstimateAndErrorBoundsUDF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Double>evaluate(org.apache.hadoop.io.BytesWritable serializedSketch)Get an estimate from a given CpcSketch using the default seed and kappaList<Double>evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa)Get an estimate and bounds from a given CpcSketch with default seedList<Double>evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa, long seed)Get an estimate and bounds from a given CpcSketch with explicit seed
-
-
-
Method Detail
-
evaluate
public List<Double> evaluate(org.apache.hadoop.io.BytesWritable serializedSketch)
Get an estimate from a given CpcSketch using the default seed and kappa- Parameters:
serializedSketch- CpcSketch in a serialized binary form- Returns:
- estimate of unique count
-
evaluate
public List<Double> evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa)
Get an estimate and bounds from a given CpcSketch with default seed- Parameters:
serializedSketch- CpcSketch in a serialized binary formkappa- given number of standard deviations from the mean: 1, 2 or 3- Returns:
- estimate, lower and upper bound
-
evaluate
public List<Double> evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa, long seed)
Get an estimate and bounds from a given CpcSketch with explicit seed- Parameters:
serializedSketch- CpcSketch in a serialized binary formkappa- given number of standard deviations from the mean: 1, 2 or 3seed- update seed- Returns:
- estimate, lower and upper bound
-
-