ROC Example: OutputTable, AUC ('true'), Gini ('true') | Teradata Vantage - ROC Example: OutputTable, AUC ('true'), Gini ('true') - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

The input table is roc_input, as in ROC Example: OutputTable, Default Values.

SQL Call

Because this call specifies AUC ('true') and Gini ('true') and omits the ROCValues syntax element, the ROCValues syntax element has the value 'false'.

SELECT * FROM ROC (
  ON roc_input AS InputTable
  OUT TABLE OutputTable (roc_out_3)
  USING
  ProbabilityColumn ('model_id')
  ObservationColumn ('observation')
  PositiveClass ('1')
  NumThresholds (100)
  AUC ('true')
  Gini ('true')
) AS dt;

Output

 info          
 ------------- 
 ROC complete.
SELECT * FROM roc_out_3;
 model_id auc                gini               
 -------- ------------------ ------------------ 
        1 0.9833333333333334 0.9666666666666668
        2                1.0                1.0
        3 0.9583333333333333 0.9166666666666665
        4 0.9895833333333334 0.9791666666666667

Download a zip file of all examples and a SQL script file that creates their input tables.