1.0 - 8.00 - AdaBoostPredict Example 2: OutputResponseProbDist, Responses - 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

Input tables are from DecisionTree Example 1:
  • attribute_table: iris_attribute_test
  • model_table: iris_attribute_output

SQL Call

CREATE MULTISET TABLE adaboost_predict AS (
  SELECT * FROM AdaBoostPredict (
  ON iris_attribute_test AS attributetable PARTITION BY pid
  ON iris_attribute_output AS model DIMENSION
  USING
  AttrTableGroupByColumns ('attribute')
  AttrTablePIDColumns ('pid')
  AttrTableValColumn ('attrvalue')
  OutputResponseProbDist ('true')
  Responses('1','2','3')
  ) AS dt 
) WITH DATA;

Output

pid | pred_label | prob_for_label_1 | prob_for_label_2 | prob_for_label_3 
-----+------------+------------------+------------------+------------------
   5 | 1          |          0.99888 |          0.00112 |          0.00000
  10 | 1          |          0.98116 |          0.00062 |          0.01822
  15 | 1          |          0.99888 |          0.00112 |          0.00000
  20 | 1          |          0.99888 |          0.00112 |          0.00000
  25 | 2          |          0.02431 |          0.92703 |          0.04865
  30 | 1          |          0.98116 |          0.00062 |          0.01822
  35 | 1          |          0.98116 |          0.00062 |          0.01822
  40 | 1          |          1.00000 |          0.00000 |          0.00000
  45 | 1          |          0.97561 |          0.02439 |          0.00000
  50 | 1          |          1.00000 |          0.00000 |          0.00000
  55 | 2          |          0.00965 |          0.93905 |          0.05131
  60 | 2          |          0.01170 |          0.96589 |          0.02241
  65 | 2          |          0.01145 |          0.96663 |          0.02192
  70 | 2          |          0.01142 |          0.96671 |          0.02187
  75 | 2          |          0.00907 |          0.94268 |          0.04825
  80 | 2          |          0.01142 |          0.96671 |          0.02187
  85 | 2          |          0.00965 |          0.93900 |          0.05134
  90 | 2          |          0.00907 |          0.94268 |          0.04825
  95 | 2          |          0.00907 |          0.94268 |          0.04825
 100 | 2          |          0.00907 |          0.94268 |          0.04825
 105 | 3          |          0.00000 |          0.01651 |          0.98349
 110 | 3          |          0.00000 |          0.00764 |          0.99236
 115 | 3          |          0.00000 |          0.01422 |          0.98578
 120 | 2          |          0.01082 |          0.91434 |          0.07484
 125 | 3          |          0.00000 |          0.00764 |          0.99236
 130 | 2          |          0.01344 |          0.89826 |          0.08831
 135 | 2          |          0.01242 |          0.90597 |          0.08161
 140 | 3          |          0.00000 |          0.01651 |          0.98349
 145 | 3          |          0.00000 |          0.00764 |          0.99236
 150 | 3          |          0.00000 |          0.01790 |          0.98210
(30 rows)