SAX Syntax Elements - 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ā„¢
TargetColumns
Specify the names of the InputTable columns that contain the time series data to transform.
TimeColumn
[Optional] Specify the name of the InputTable column that contains the time axis of the data.
WindowType
[Optional] Specify how much data the function processes at one time:
Option Description
'global' (Default) Function computes SAX code using single mean and standard deviation for entire data set.
'sliding' Function recomputes mean and standard deviation for sliding window of data set.
OutputType
[Optional] Specify how the function outputs the results:
Option Description
'string' (Default) Function outputs list of SAX codes for each window.
'bytes' Function outputs list of SAX codes as compact byte arrays (which humans cannot read).
'bitmap' Function outputs JSON representation of SAX bitmap.
'characters' Function outputs one character for each line.
Mean
[Optional][Single-input syntax only] Specify the global mean values that the function uses to calculate the SAX code for every partition. A mean_value has the data type DOUBLE PRECISION.

If Mean specifies only one value and TargetColumns specifies multiple columns, the specified value applies to every target_column.

If Mean specifies multiple values, it must specify a value for each target_column. The nth mean_value corresponds to the nth target_column.

Tip: To specify a different global mean value for each partition, use the multiple-input syntax and put the values in the MeanStats table.
STDev
[Optional][Single-input syntax only] Specify the global standard deviation values that the function uses to calculate the SAX code for every partition. A stdev_value has the data type DOUBLE PRECISION and its value must be greater than 0.

If STDev specifies only one value and TargetColumns specifies multiple columns, the specified value applies to every target_column.

If STDev specifies multiple values, it must specify a value for each target_column. The nth stdev_value corresponds to the nth target_column.

Tip: To specify a different global standard deviation value for each partition, use the multiple-input syntax and put the values in the STDevStats table.
WindowSize
[Required if WindowType is 'sliding', disallowed otherwise.] Specify the size of the sliding window. The value must be an integer greater than 0.
OutputFrequency
[Optional] Specify the number of data points that the window slides between successive outputs. The value must be an integer greater than 0.
WindowType value must be 'sliding' and OutputType value cannot be 'characters'. If WindowType is 'sliding' and OutputType value is 'characters', OutputFrequency is automatically set to the value of WindowSize, so that a single character is assigned to each time point. If the number of data points in the time series is not an integer multiple of the window size, the function ignores the leftover parts.
Default: 1
PointsPerSymbol
[Optional] Specify the number of data points to convert into one SAX symbol. Each value must be an integer greater than 0.
WindowType value must be 'global'.
Default: 1
SymbolsPerWindow
[Optional] Specify the number of SAX symbols to create for each window. Each value must be an integer greater than 0.
WindowType value must be 'sliding'.
Default: window_size (the value of WindowSize)
AlphabetSize
[Optional] Specify the number of symbols in the SAX alphabet. The value must be an integer in the range [2, 20].
Default: 4
BitmapLevel
[Optional] Specify the number of consecutive symbols to convert to one symbol on a bitmap. For bitmap level 1, the bitmap contains the symbols 'a', 'b', 'c', and so on; for bitmap level 2, the bitmap contains the symbols 'aa', 'ab', 'ac', and so on. The input value must be an integer in the range [1, 4].
OutputType value must be 'bitmap'.
Default: 2
OutputStats
[Optional] Specify whether the function prints the mean and standard deviation.
OutputType value must be 'string'.
Default: 'false'
Accumulate
[Optional] Specify the names of the input table columns that are to appear in the output table. For each sequence in the input table, SAX choose the value corresponding to the first time point in the sequence to output as the accumulate value.