Sampling Function | Teradata Vantage - Sampling (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 Sampling function draws rows randomly from the input table.

The function offers two sampling schemes:

  • A simple Bernoulli (Binomial) sampling on a row-by-row basis with given sample rates
  • Sampling without replacement that selects a given number of rows

Sampling can be either unconditional or conditional. Unconditional sampling applies to all input data and always uses the same random number generator. Conditional sampling applies only to input data that meets specified conditions and uses a different random number generator for each condition.

The Sampling function does not guarantee the exact sizes of samples. If each sample must have an exact number of rows, use the RandomSample (ML Engine) function.