Examples | Gain Ratio Extreme Decision Tree Scoring | Vantage Analytics Library - Examples - Vantage Analytics Library

Vantage Analytics Library User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Vantage Analytics Library
Release Number
2.2.0
Published
March 2023
Language
English (United States)
Last Update
2024-01-02
dita:mapPath
ibw1595473364329.ditamap
dita:ditavalPath
iup1603985291876.ditaval
dita:id
zyl1473786378775
Product Category
Teradata Vantage

Decision Tree that Subsequent Examples Score

call td_analyze (
  'decisiontree',
  'database = val_source;
   tablename = customer_analysis;
   columns = income, age, nbr_children;
   dependent = gender;
   min_records = 2;
   max_depth = 5;
   binning = false;
   algorithm = gainratio;
   pruning = gainratio;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt;
   operatordatabase = val_user;'
);

samplescoresize Parameter

call td_analyze (
  'decisiontreescore',
  'samplescoresize = 10;
   database = val_source;
   tablename = customer_analysis;
   modeldatabase = val_results;
   modeltablename = cust_analysis_dt;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt_score;
   retain = city_name, state_code;'
);

Produce Two Profile Tables

The two profile tables capture decision rules for each customer or prediction.

call td_analyze (
  'decisiontreescore',
  'database = val_source;
   tablename = customer_analysis;
   modeldatabase = val_results;
   modeltablename = cust_analysis_dt;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt_score;
   retain = city_name, state_code;
   profiletables = true;'
);

includeconfidence Parameter

The output table contains a column indicating how likely it is, for a particular leaf node in the tree, that the prediction is correct.

call td_analyze (
  'decisiontreescore',
  'database = val_source;
   tablename = customer_analysis;
   modeldatabase = val_results;
   modeltablename = cust_analysis_dt;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt_score_conf;
   retain = city_name, state_code;
   includeconfidence = true;'
);

targetedvalue Parameter

The output table contains a column indicating how likely it is, for a particular leaf node and binary targeted value, that the prediction is correct.

call td_analyze (
  'decisiontreescore',
  'database = val_source;
   tablename = customer_analysis;
   modeldatabase = val_results;
   modeltablename = cust_analysis_dt;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt_score_target;
   retain = city_name, state_code;
   targetedvalue = F;'
);

Confusion Matrix

A Confusion Matrix is an evaluation function.

call td_analyze (
  'decisiontreescore',
  'database = val_source;
   tablename = customer_analysis;
   modeldatabase = val_results;
   modeltablename = cust_analysis_dt_m;
   outputdatabase = val_results;
   outputtablename = cust_analysis_dt_score_m;
   retain = city_name, state_code;
   scoringmethod = scoreandevaluate;'
);