Approximate Percentile Function | Teradata Vantage - Approximate Percentile (ML Engine) - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

The Approximate Percentile function, composed of ApproxPercentileReduce and ApproxPercentileMap, computes approximate percentiles for one or more columns of data. The nth percentile is the smallest value in a data set that is greater than n% of the values. The larger the data set, the more accurate the approximate percentile.

The Approximate Percentile function is based on an algorithm developed by Greenwald and Khanna. The function gives e-approximate quantile summaries of a set of N elements, where e is the error (the desired accuracy of the approximation). Given any rank r, an e-approximate summary returns a value whose rank r' is in the interval [r - eN, r + eN]. The algorithm has a worst-case space requirement of O((1/e) * log(eN)).

When running the Approximate Percentile function, you specify e with the ErrorRate parameter.