2.0 - PMMLPredict Example: Empty Prediction Column - 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 creates a table from a PMMLPredict call and shows that it has an empty prediction column.

CREATE TABLE byomop AS (
  SELECT * FROM mldb.PMMLPredict (
    ON iris_test AS InputTable
    ON (SELECT * FROM pmml_models WHERE model_id='iris_db_rf_model') DIMENSION
    USING
      Accumulate ('id')
  ) AS td
) WITH DATA;
SELECT * FROM byomop;
 id prediction json_report
--- ---------- ----------------------------------------------------------------
 40            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
120            {"probability(2)":0.91,"probability(1)":0.0,"probability(3)":0.09}
 80            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
 15            {"probability(2)":0.04,"probability(1)":0.96,"probability(3)":0.0}
 55            {"probability(2)":0.97,"probability(1)":0.0,"probability(3)":0.03}
135            {"probability(2)":0.76,"probability(1)":0.0,"probability(3)":0.24}
 95            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
 30            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
110            {"probability(2)":0.0,"probability(1)":0.0,"probability(3)":1.0}
 70            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
150            {"probability(2)":0.16,"probability(1)":0.0,"probability(3)":0.84}
 45            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
  5            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
 85            {"probability(2)":0.87,"probability(1)":0.06,"probability(3)":0.07}
 20            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
125            {"probability(2)":0.0,"probability(1)":0.0,"probability(3)":1.0}
 60            {"probability(2)":0.96,"probability(1)":0.0,"probability(3)":0.04}
100            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
 75            {"probability(2)":0.99,"probability(1)":0.0,"probability(3)":0.01}
140            {"probability(2)":0.0,"probability(1)":0.0,"probability(3)":1.0}
115            {"probability(2)":0.05,"probability(1)":0.0,"probability(3)":0.95}
 35            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
 90            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
 10            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
130            {"probability(2)":0.54,"probability(1)":0.0,"probability(3)":0.46}
 50            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
 25            {"probability(2)":0.0,"probability(1)":1.0,"probability(3)":0.0}
 65            {"probability(2)":1.0,"probability(1)":0.0,"probability(3)":0.0}
145            {"probability(2)":0.0,"probability(1)":0.0,"probability(3)":1.0}
105            {"probability(2)":0.0,"probability(1)":0.0,"probability(3)":1.0}

The prediction column is empty because the json_report has no prediction field.