- 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