ROC Example 3: Show AUC and Gini Values - 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ā„¢

Input

iris
pid prob1 prob2 obs
2 0.66667 0.33333 1
4 0.66667 0.33333 1
6 0.66667 0.33333 1
8 0.66667 0.33333 1
10 0.66667 0.33333 1
12 0.66667 0.33333 1
14 0.66667 0.33333 1
16 0.66667 0.33333 1
18 0.66667 0.33333 1
20 0.66667 0.33333 1
... ... ... ...

SQL Call

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

SELECT * FROM ROC (
  ON iris AS InputTable
  OUT TABLE OutputTable (irisout18)
  USING
  ProbabilityColumn ('prob2')
  ObsColumn ('obs')
  PositiveClass ('2')
  NumThreshold (100)
  AUC ('true')
  Gini ('true')
) AS dt;

Output

info
ROC complete.
irisout18
auc gini
0.9464 0.8928

The AUC value is much greater than 0.5, which means that the model performs well, and you can use it for prediction.