TD_TargetEncodingFit Usage Notes | TargetEncodingFit - TD_TargetEncodingFit Usage Notes - 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ā„¢
  • The InputTable in the TD_TargetEncodingFit query can have no partition at all or have PARTITION BY ANY clause.
  • The TD_TargetEncodingFit function requires a CategoryTable to be passed as a dimension. The CategoryTable can be generated by the TD_CategoricalSummary function using this query:
    CREATE TABLE categoryTable AS (
    SELECT ColumnName, count(*) AS CategoryCount FROM (
    SELECT * FROM TD_CategoricalSummary(
    ON titanic_train AS InputTable
    USING
    TargetColumns('[1:2]')
    ) AS dt WHERE DistinctValue IS NOT NULL) AS CatTable GROUP BY ColumnName) WITH data;
  • Null categories are not encoded.
  • The DefaultValue argument must be provided to TD_TargetEncodingFit if you want to assign any target value for missing categories in the TD_TargetEncodingTransform function.
  • These arguments are mandatory, otherwise an error is reported:
    • EncoderMethod
    • TargetColumns
    • ResponseColumn