SUBSAMPLE
Applies to PredictiveInsight only.
Syntax
SUBSAMPLE(num_samples, data)
Parameters
num_samples
The number of samples to extract. This must be a positive integer less than the number of cells in the specified data range (that is, the SUBSAMPLE macro function cannot be used to increase the number of data points by replication).
data
The values to sample from. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your IBM® Unica® product.
Description
SUBSAMPLE evenly samples the requested number of data points from the specified data range. It returns one new column for each input column, each containing num_samples rows of the numbers uniformly extracted from the corresponding input column. The first row value and each n-th row value thereafter is returned, so that a total of num_samples are extracted.
*
Examples
Creates a new column named TEMP, which contains 100 values evenly sampled from column V1.
Creates three new columns named TEMP, VX, and VY, each containing 50 values. The values in the TEMP column are the sample values of the contents of column V1, the values of the VX column are the samples values of the contents of column V2, and the values of the VY column are the sample values of the contents of column V3.
Creates a new column named TEMP with values in the first five rows. Data is evenly sampled from rows 0-100 of column V1.
Creates two new columns named TEMP and VX, each with values in the first 250 rows. The values in column TEMP are evenly sampled from rows 1-400 of column V1, and the values in column VX are evenly sampled from rows 1-400 of column V2.
Related Functions