XGBoostPredict Example 2: Multiple-Class Classification - 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

SQL Call

CREATE MULTISET TABLE iris_predict AS (
  SELECT * FROM XGBoostPredict (
    ON iris_test AS "input" PARTITION BY ANY
    ON xgboost_model2 AS modeltable DIMENSION ORDER BY tree_id, iter, class_num
    USING
    IDColumn ('id')
    NumBoostedTrees (2)
    Accumulate ('species')
  ) AS dt
) WITH DATA;

Output

The table iris_predict is similar to the following table, but has 120 rows.

id species prediction confidence_lower confidence_upper
5 1 1 1 1
15 1 1 1 1
25 1 1 1 1
35 1 1 1 1
45 1 1 1 1
55 2 2 1 1
65 2 2 1 1
75 2 2 1 1
85 2 2 1 1
95 2   1 1
105 3 3 1 1
115 3 3 1 1
125 3 3 1 1
135 3 3 1 1
145 3 3 1 1
... ... ... ... ...