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

Vantage Analytics Library User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Lake
Product
Vantage Analytics Library
Release Number
2.2.0
Published
June 2025
ft:locale
en-US
ft:lastEdition
2025-07-02
dita:mapPath
ibw1595473364329.ditamap
dita:ditavalPath
iup1603985291876.ditaval
dita:id
zyl1473786378775
Product Category
Teradata Vantage
CALL td_analyze (
  'decisiontreescore',
  'required_parameter_list [ optional_parameter; [...] ]'
);
required_parameter_list
database = input_database_name;
tablename = input_table_name;
modeldatabase = model_database_name;
modeltablename = model_table_name;
outputdatabase = output_database_name;
outputtablename = output_table_name;
optional_parameter
{ gensqlonly = { true | false } |
  includeconfidence = { true | false } |
  index = index_column [,...] |
  overwrite = { true | false } |
  predicted = predicted_column |
  profiletables = { true | false } |
  retain = retain_column [,...] |
  samplescoresize = sample_score_size |
  scoringmethod = { score | evaluate | scoreandevaluate } |
  targetedvalue = targeted_value |
}

Syntax Elements

database
The database containing the table to analyze.
tablename
The table containing the columns to analyze, representing the dependent and independent variables in the analysis. It must reside in the database indicated by the database parameter.
modeldatabase
The database containing the table representing the decision tree model input to the analysis.
modeltablename
The table containing the decision tree model in PMML format that is used to score the data. It must reside in the database indicated by the modeldatabase parameter.
outputdatabase
The database containing the output table.
outputtablename
The scored output table, which contains the predicted values of the dependent variable. It must reside in the database indicated by the outputdatabase parameter.
gensqlonly
[Optional] True returns the SQL for the function as a result set but does not run it.
False runs the SQL for the function but does not return it as a result set.
Default: false
includeconfidence
[Optional] Whether the output table includes the confidence factor, the likeliness that the prediction for a particular leaf node is correct.
For example, if a leaf node contains 10 observations and 9 predict Buy and 1 predicts Do Not Buy, the confidence factor for the leaf node is .9 or be 90%.
Disallowed with targetedvalue.
Default: false
index
[Optional] The columns for the primary index of the score output table. These columns must form a unique key for the score output table. Otherwise, a given observation has more than one score.
These index columns are included both in the Primary Index clause and the select list.
Default: Primary index columns of the input table
predicted
[Optional] With scoringmethod=score or scoringmethod=scoreandevaluate, the input table column that has the predicted values.
Default: Dependent column
profiletables
[Optional] Whether to create profile tables for the leaf nodes, add a node ID field to the scored output table (output_table_name), and link scored output table rows to their corresponding leaf nodes (thereby capturing decision rules for a given customer or prediction).
The names of the profile tables are output_table_name_1 and output_table_name_2. The first table contains the confidence factor or targeted confidence factor (if includeconfidence=true or targetedvalue=true) and prediction information. The second table contains the rules that corresponding to each leaf node.
Default: false
retain
[Optional] One or more input table columns to copy to the output table.
samplescoresize
[Optional] If scoringmethod=score or scoringmethod=scoreandevaluate, the number of output table rows to show in a sample of the result set (an integer).
Default behavior: Function returns no sample.
scoringmethod
[Optional] Whether to score (only), evaluate (only), or score and evaluate.
With the options evaluate and scoreandevaluate, the function outputs a confusion matrix table in XML format. The table includes counts of predicted and actual values of the dependent variable of the decision tree model and counts of correct and incorrect predictions.
Default: score
targetedvalue
[Optional if predicted variable has only two possible outcomes, disallowed otherwise.] Whether the output table includes the targeted confidence value, the likeliness that the targeted value of a predicted binary result for a particular leaf node is correct.
For example, if a leaf node contains 10 observations and 9 predict Buy and 1 predicts Do Not Buy, the confidence factor for the leaf node is 0.9 or 90%. If the target value (in the column specified by predicted) is Buy, the targeted confidence value is 0.9 or 90%. If the target value is Do Not Buy, the targeted confidence value is 0.1 or 10%.
Disallowed with includeconfidence.
Default: false