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

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

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;