Updated on 2024-12-13 GMT+08:00

Quantile Digest Functions

Overview

Quantile digest is a data sketch that stores approximate percentile information. The HetuEngine type for this data structure is called qdigest.

Function

  • merge(qdigest) → qdigest

    Description: Merges all input qdigest data into one qdigest.

  • value_at_quantile(qdigest(T), quantile) → T

    Description: Returns the approximate percentile values from the quantile digest given the number quantile between 0 and 1.

  • values_at_quantiles(qdigest(T), quantiles) -> array(T)

    Description: Returns the approximate percentile values as an array given the input quantile digest and array of values between 0 and 1 which represent the quantiles to return.

  • qdigest_agg(x) -> qdigest([same as x])

    Description: Returns the qdigest which is composed of all input values of x.

  • qdigest_agg(x, w) -> qdigest([same as x])

    Description: Returns the qdigest which is composed of all input values of x using the per-item weight w.

  • qdigest_agg(x, w, accuracy) -> qdigest([same as x])

    Description: Returns the qdigest which is composed of all input values of x using the per-item weight w and maximum error of accuracy. accuracy must be a value greater than zero and less than one, and it must be constant for all input rows.