Optional Syntax Elements for TD_OrdinalEncodingFit - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢
ON clause
Accepts the CategoryTable clause.
OUT clause
Accepts the OutputTable clause.
OrdinalValuesColumn
[When using CategoryTable] Specifies the CategoryTable column which contains the ordinal values.
If omitted, ordinal values are generated based on the StartValue argument.
Approach
Specifies AUTO to obtain categories from the input table or specify LIST to obtain categories from the user.
Default value: AUTO.
OrdinalValues
[When using the LIST approach and a single target column] Specifies the custom ordinal values to replace the categories when you use the LIST approach for encoding the categorical values.
If you do not provide the ordinal value and the start value, then by default, the first category contains the default start value 0, and the last category is assigned a value that is one lesser than the total number of categories.
For example, if there are three categories, then the categories contain the values 0, 1, 2 respectively.
However, if you only specify the ordinal values, then each ordinal value is associated with a categorical value. For example, if there are three categories and the ordinal values are 3, 4, 5 then the ordinal values are assigned to the respective categories.
The TD_OrdinalEncodingFit function returns an error when the ordinal value count does not match the categorical value count or if both the ordinal values and the start value are provided.
You can either use the OrdinalValues or the StartValue argument in the syntax.
If only one target column is provided, ordinal values are read from this argument. Otherwise, they are read from the CategoryTable.
If omitted, ordinal values are generated based on the StartValue argument.
This argument is supported to keep the backward compatibility.
Default value: 0 to NumOfCategories -1.
StartValue
Specifies the starting value for the ordinal values list.
If only one value is specified, the value is applied to all the target columns. Otherwise, the number of start values must be equal to the number of target columns.
Default value: 0.
DefaultValue
Specifies the ordinal value to use when the categorical value is not found during transform.
The TD_OrdinalEncodingFit function adds the TD_OTHER_CATEGORY row and assigns the specified value to the row in the FIT table output.
If you specify the default value in the TD_OrdinalEncodingFit function and if the TD_OrdinalEncodingTransform function does not find the categorical value in the FIT table, then the function assigns the TD_OTHER_CATEGORY value to the missing category.
If you do not specify the default value in the TD_OrdinalEncodingFit function and if the TD_OrdinalEncodingTransform function does not find the categorical value in the FIT table, then the TD_OrdinalEncodingTransform function returns an error.
If only one value is specified, the value is applied to all the target columns. Otherwise, the number of default values must be equal to the number of target columns.
Default value: 0.