XGBoostPredict Example 1: Binary 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

input: housing_test_binary
sn price lotsize bedrooms bathrms stories driveway recroom fullbase gashw airco garagepl prefarea homestyle
13 27000 1700 3 1 2 yes no no no no 0 no Classic
16 37900 3185 2 1 1 yes no no no yes 0 no Classic
540 85000 7320 4 2 2 yes no no no no 0 no Eclectic
... ... ... ... ... ... ... ... ... ... ... ... ... ...

SQL Call

CREATE MULTISET TABLE housing_predict AS (
  SELECT * FROM XGBoostPredict (
    ON housing_test_binary AS "input" PARTITION BY ANY
    ON xgboost_model AS modeltable DIMENSION ORDER BY tree_id, iter, class_num
    USING
    IDColumn ('sn')
    NumBoostedTrees (1)
    Accumulate ('homestyle')
  ) AS dt
) WITH DATA;
 

Output

housing_predict
sn homestyle prediction confidence_lower confidence_upper
16 Classic Classic 1 1
38 Eclectic Eclectic 1 1
132 Classic Classic 1 1
140 Classic Classic 1 1
142 Classic Classic 1 1
176 Eclectic Eclectic 1 1
198 Classic Classic 1 1
224 Eclectic Eclectic 1 1
234 Classic Classic 1 1
254 Eclectic Eclectic 1 1
... ... ... ... ...