# Package org.apache.datasketches.pig.quantiles

Pig UDFs for Quantiles sketches.

See: Description

Class Summary
DataToDoublesSketch: This is a Pig UDF that builds Sketches from data.
DataToDoublesSketch.Initial: Class used to calculate the initial pass of an Algebraic sketch operation.
DataToDoublesSketch.IntermediateFinal: Class used to calculate the intermediate or final combiner pass of an Algebraic sketch operation.
DataToItemsSketch<T>: Builds ItemsSketch from data.
DataToItemsSketch.DataToItemsSketchInitial: Class used to calculate the initial pass of an Algebraic sketch operation.
DataToItemsSketch.DataToItemsSketchIntermediateFinal<T>: Class used to calculate the intermediate or final combiner pass of an Algebraic sketch operation.
DataToStringsSketch: Creates an ItemsSketch<String> from raw data.
DataToStringsSketch.DataToStringsSketchIntermediateFinal
DoublesSketchToString: This UDF is to get a human-readable summary of a given sketch.
GetKFromDoublesSketch: This UDF is to get the parameter K from a given sketch.
GetKFromStringsSketch: This UDF is to get the parameter K from a given sketch.
GetPmfFromDoublesSketch: This UDF is to get an approximation to the Probability Mass Function (PMF) of the input stream given a sketch and a set of split points - an array of m unique, monotonically increasing double values that divide the real number line into m+1 consecutive disjoint intervals.
GetPmfFromStringsSketch: This UDF is to get an approximation to the Probability Mass Function (PMF) of the input stream given a sketch and a set of split points - an array of m unique, monotonically increasing values that divide the domain into m+1 consecutive disjoint intervals.
GetQuantileFromDoublesSketch: This UDF is to get a quantile value from a DoublesSketch.
GetQuantileFromStringsSketch: This UDF is to get a quantile value from an ItemsSketch<String>.
GetQuantilesFromDoublesSketch: This UDF is to get a list of quantile values from an DoublesSketch given a list of fractions or a number of evenly spaced intervals.
GetQuantilesFromStringsSketch: This UDF is to get a list of quantile values from an ItemsSketch<String> given a list of fractions or a number of evenly spaced intervals.
StringsSketchToString: This UDF is to get a human-readable summary of a given sketch.
UnionDoublesSketch: This is a Pig UDF that merges Quantiles Sketches.
UnionDoublesSketch.Initial: Class used to calculate the initial pass of an Algebraic sketch operation.
UnionDoublesSketch.IntermediateFinal: Class used to calculate the intermediate or final combiner pass of an Algebraic union operation.
UnionItemsSketch<T>: Computes union of ItemsSketch.
UnionItemsSketch.UnionItemsSketchInitial: Class used to calculate the initial pass of an Algebraic sketch operation.
UnionItemsSketch.UnionItemsSketchIntermediateFinal<T>: Class used to calculate the intermediate or final combiner pass of an Algebraic union operation.
UnionStringsSketch: Computes union of ItemsSketch<String>.
UnionStringsSketch.UnionStringsSketchIntermediateFinal

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

Pig UDFs for Quantiles sketches. This includes UDFs for generic ItemsSketch and specialized DoublesSketch.

The generic implementation is in the form of abstract classes DataToItemsSketch and UnionItemsSketch to be specialized for particular types of items. An implementation for strings is provided: DataToStringsSketch, UnionStringsSketch, plus UDFs to obtain the results from sketches: GetQuantileFromStringsSketch, GetQuantilesFromStringsSketch and GetPmfFromStringsSketch.

Support for DoublesSketch: DataToDoublesSketch, UnionDoublesSketch, GetQuantileFromDoublesSketch, GetQuantilesFromDoublesSketch, GetPmfFromDoublesSketch

Author:
  Alexander Saydakov