1.1 - 8.10 - DecisionForestPredict_MLE Example: CategoricalEncoding ('Hashing') - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

In this example, DecisionForest specifies CategoricalEncoding ('Hashing') when it builds the Model table; therefore, DecisionForestPredict_MLE requires NumericInputs and CategoricalInputs.

DecisionForest Input

DecisionForest SQL Call

SELECT * FROM DecisionForest (
  ON housing_train AS InputTable
  OUT TABLE OutputTable (rft_model)
  OUT TABLE MonitorTable (housing_monitor_table)
  USING
  ResponseColumn ('homestyle')
  NumericInputs ('price','lotsize','bedrooms','bathrms','stories', 'garagepl')
  CategoricalInputs ('driveway','recroom','fullbase','gashw','airco','prefarea')
  TreeType ('classification')
  MinNodeSize ('2')
  MaxDepth ('12')
  NumTrees ('3')
  CategoricalEncoding ('hashing')
) AS dt ;

DecisionForestPredict_MLE Input

DecisionForestPredict_MLE SQL Call

SELECT * FROM DecisionForestPredict_MLE (
  ON housing_test PARTITION BY ANY
  ON rft_model AS Model DIMENSION
  USING
  IDColumn ('sn')
  NumericInputs ('price','lotsize','bedrooms','bathrms','stories', 'garagepl')
  CategoricalInputs ('driveway','recroom','fullbase','gashw','airco','prefarea')
) AS dt;