# Package org.apache.datasketches.pig.cpc

Pig UDFs for CPC sketches.

See: Description

Class Summary
AlgebraicInitial: Class used to calculate the initial pass of an Algebraic sketch operation.
DataToSketch: This is a Pig UDF that builds sketches from data.
DataToSketchAlgebraicFinal
DataToSketchAlgebraicIntermediate
GetEstimate: This is a User Defined Function (UDF) for getting a distinct count estimate from a given CpcdSketch
GetEstimateAndErrorBounds: This is a User Defined Function (UDF) for obtaining the distinct count estimate along with a lower and upper bound from a given CpcSketch.
SketchToString: This is a User Defined Function (UDF) for printing a human-readable summary of a given CpcSketch
UnionSketch: This is a Pig UDF that performs the Union operation on CpcSketches.
UnionSketchAlgebraicFinal
UnionSketchAlgebraicIntermediate

## Package org.apache.datasketches.pig.cpc Description

Pig UDFs for CPC sketches. This is a distinct-counting sketch that implements the Compressed Probabilistic Counting (CPC, a.k.a FM85) algorithms developed by Kevin Lang in his paper Back to the Future: an Even More Nearly Optimal Cardinality Estimation Algorithm.

Author:
  Alexander Saydakov