1.0 - 8.00 - ROC Example 3: Show AUC and Gini Values - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

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.