2.0 - PMMLPredict Example: Specify ModelOutputFields - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Product
Teradata Vantage
Release Number
2.0
Release Date
October 2021
Content Type
User Guide
Publication ID
B700-1111-051K
Language
English (United States)

This example shows a table created from a PMMLPredict call that specifies ModelOutputFields.

SELECT * FROM mldb.PMMLPredict (
  ON iris_test
  ON (SELECT * FROM pmml_models WHERE model_id='iris_rf_class_model') DIMENSION
  USING
    Accumulate ('id')
    ModelOutputFields ('probability_0', 'probability_1', 'probability_2')
) as td;
 id  prediction          probability_0          probability_1          probability_2
---  ----------  ---------------------  ---------------------  ---------------------
 40  0           9.80000000000000E-001  2.00000000000000E-002  0.00000000000000E 000
120  2           2.00000000000000E-002  4.60000000000000E-001  5.20000000000000E-001
 80  1           0.00000000000000E 000  1.00000000000000E 000  0.00000000000000E 000
 15  0           1.00000000000000E 000  0.00000000000000E 000  0.00000000000000E 000
 55  1           0.00000000000000E 000  1.00000000000000E 000  0.00000000000000E 000
135  2           0.00000000000000E 000  1.70000000000000E-001  8.30000000000000E-001
 95  1           0.00000000000000E 000  1.00000000000000E 000  0.00000000000000E 000
 30  0           1.00000000000000E 000  0.00000000000000E 000  0.00000000000000E 000
110  2           0.00000000000000E 000  0.00000000000000E 000  1.00000000000000E 000
 70  1           0.00000000000000E 000  9.90000000000000E-001  1.00000000000000E-002
150  2           0.00000000000000E 000  5.00000000000000E-002  9.50000000000000E-001