DecisionForest Example 2: Classification Tree with Out-of-Bag Error - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Like Example 1, this example uses home sales data to create a classification tree that predicts home style, which can be input to the Forest_Predict Example. However, this example outputs the out-of-bag error.

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 ('50')
  Mtry ('3')
  OutOfBag ('true') 
) AS dt;

Output

message
Computing 48 classification trees.
Each worker is computing 16 trees.
Each tree will contain approximately 164 points.
Poisson sampling parameter: 1.00
OOB estimate of error rate: 4.0733197556008145%
Decision forest created.

The model table, rft_model, looks the same as it does in DecisionForest Example 1: Classification Tree without Out-of-Bag Error.