AdaBoost Example: OutputProb - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

  • AttributeTable: iris_attribute_train
  • ResponseTable: iris_response_train

The preceding tables are created in DecisionTree Example: Create Model.

SQL Call

SELECT * FROM AdaBoost (
 ON iris_attribute_train AS AttributeTable 
 ON iris_response_train AS ResponseTable 
 OUT TABLE OutputTable (iris_attribute_output_ab)
 USING
 IDColumns ('pid')
 AttributeNameColumns ('attribute')
 AttributeValueColumn ('attrvalue')
 ResponseColumn ('response')
 ApproxSplits ('false')
 IterNum (5)
 NumSplits (10)
 MaxDepth (3)
 MinNodeSize (5)
 OutputProb ('true')
) AS dt;

Output

 message                                                     
 ----------------------------------------------------------- 
 Running 5 round AdaBoost, computing 5 classification trees.
 AdaBoost model created.
SELECT * FROM iris_attribute_output_ab;
 classifier_id classifier_weight  node_id node_label  node_majorfreqs      attribute      split_value left_bucket right_bucket left_label  right_label left_majorfreqs       right_majorfreqs     left_label_probdist     right_label_probdist    prob_label_order                    
 ------------- ------------------ ------- ----------- -------------------- -------------- ----------- ----------- ------------ ----------- ----------- --------------------- -------------------- ----------------------- ----------------------- ----------------------------------- 
             1  4.060443010546419       1           1  0.33333333333333354 petal_length           1.7                                    1           2    0.3000000000000001   0.3250000000000002 0.00000,0.00000,0.30000 0.32500,0.01667,0.03333           2,          3,          1
             1  4.060443010546419       5           3 0.041666666666666664 sepal_width            3.1                                    3           2  0.041666666666666664 0.008333333333333333 0.00000,0.04167,0.00000 0.00833,0.00000,0.00000           2,          3,          1
             2  4.025351690735154       0           3  0.44252873563218414 petal_length           4.0                                    1           3   0.27873563218390807  0.44252873563218414 0.02011,0.00000,0.27874 0.25862,0.44253,0.00000           2,          3,          1
             2  4.025351690735154       1           1   0.2787356321839083 sepal_width            2.8                                    2           1  0.020114942528735635  0.27586206896551746 0.02011,0.00000,0.00287 0.00000,0.00000,0.27586           2,          3,          1
             2  4.025351690735154       3           2 0.020114942528735635 petal_length           1.4                                    1           2 0.0028735632183908054 0.020114942528735635 0.00000,0.00000,0.00287 0.02011,0.00000,0.00000           2,          3,          1
             3 3.3678261932978137       0           2   0.7509920634920665 sepal_length           5.6                                    1           2   0.09424603174603169   0.7430555555555586 0.00794,0.05754,0.09425 0.74306,0.09524,0.00198           2,          3,          1
             3 3.3678261932978137       1           1  0.09424603174603169 petal_width            1.5                                    1           3   0.09424603174603172  0.05753968253968252 0.00794,0.00000,0.09425 0.00000,0.05754,0.00000           2,          3,          1
             3 3.3678261932978137       3           1  0.09424603174603169 sepal_width            2.7                                    2           1  0.007936507936507936   0.0932539682539682 0.00794,0.00000,0.00099 0.00000,0.00000,0.09325           2,          3,          1
             4  4.396987687315392       0           2   0.8221497131359558 petal_width            1.8                                    2           3    0.8023547325774549  0.09265573592191131 0.80235,0.04100,0.04419 0.01979,0.09266,0.00000           2,          3,          1
             4  4.396987687315392       1           2   0.8023547325774545 sepal_length           5.6                                    1           2   0.04348369905103766   0.7995268782119543 0.00283,0.02050,0.04348 0.79953,0.02050,0.00071           2,          3,          1
             4  4.396987687315392       6           2 0.019794980558501273 petal_length           5.0                                    2           3  0.019794980558501273 0.003534817956875211 0.01979,0.00000,0.00000 0.00000,0.00353,0.00000           2,          3,          1
             5  4.126450132910118       0           3   0.6072756553664228 sepal_width            3.0                                    3           2    0.5978550626788979   0.2512207579936676 0.10704,0.59786,0.00362 0.25122,0.00942,0.03084           2,          3,          1
             5  4.126450132910118       1           3   0.5978550626788979 petal_length           4.7                                    2           3   0.09316033548526027   0.5908527688240146 0.09316,0.00700,0.00362 0.01388,0.59085,0.00000           2,          3,          1
             5  4.126450132910118       6           2   0.2512207579936677 petal_width            1.8                                    2           3   0.24445992254757354 0.009420592687524949 0.24446,0.00000,0.00000 0.00676,0.00942,0.00000           2,          3,          1
             1  4.060443010546419       0           1  0.33333333333333354 petal_width            1.8                                    1           3   0.33333333333333354   0.3166666666666669 0.32500,0.01667,0.33333 0.00833,0.31667,0.00000           2,          3,          1
             1  4.060443010546419       2           3   0.3166666666666668 petal_length           5.0                                    3           3  0.041666666666666664  0.27500000000000013 0.00833,0.04167,0.00000 0.00000,0.27500,0.00000           2,          3,          1
             1  4.060443010546419       4           2   0.3250000000000002 sepal_width            3.4                                    2           1    0.3166666666666668                0.025 0.31667,0.01667,0.00833 0.00833,0.00000,0.02500           2,          3,          1
             2  4.025351690735154       2           3  0.44252873563218414 sepal_width            3.4                                    3           2    0.4310344827586212  0.16666666666666669 0.09195,0.43103,0.00000 0.16667,0.01149,0.00000           2,          3,          1
             2  4.025351690735154       5           3   0.4310344827586208 petal_width            1.5                                    2           3  0.057471264367816126   0.4310344827586208 0.05747,0.00000,0.00000 0.03448,0.43103,0.00000           2,          3,          1
             2  4.025351690735154       6           2  0.16666666666666669 petal_length           4.7                                    2           3   0.16666666666666669 0.011494252873563222 0.16667,0.00000,0.00000 0.00000,0.01149,0.00000           2,          3,          1
             3 3.3678261932978137       2           2   0.7430555555555586 petal_length           5.0                                    2           2     0.631944444444447   0.1111111111111116 0.63194,0.00496,0.00198 0.11111,0.09028,0.00000           2,          3,          1
             3 3.3678261932978137       5           2    0.631944444444447 sepal_width            3.7                                    2           1     0.631944444444447 0.001984126984126984 0.63194,0.00496,0.00000 0.00000,0.00000,0.00198           2,          3,          1
             3 3.3678261932978137       6           2  0.11111111111111165 sepal_length           6.1                                    2           3   0.05555555555555582  0.08730158730158727 0.05556,0.00298,0.00000 0.05556,0.08730,0.00000           2,          3,          1
             4  4.396987687315392       2           3  0.09265573592191133 sepal_width            3.2                                    3           2   0.08912091796503613 0.019794980558501273 0.00000,0.08912,0.00000 0.01979,0.00353,0.00000           2,          3,          1
             4  4.396987687315392       3           1  0.04348369905103762 petal_width            1.5                                    1           3   0.04348369905103769 0.020501944149876213 0.00283,0.00000,0.04348 0.00000,0.02050,0.00000           2,          3,          1
             4  4.396987687315392       4           2   0.7995268782119545 sepal_width            3.0                                    2           2   0.08377518557794285   0.7157516926340116 0.08378,0.02050,0.00000 0.71575,0.00000,0.00071           2,          3,          1
             5  4.126450132910118       2           2   0.2512207579936677 petal_length           4.0                                    1           2  0.030835659145973714   0.2512207579936677 0.00000,0.00000,0.03084 0.25122,0.00942,0.00000           2,          3,          1
             5  4.126450132910118       4           3   0.5908527688240146 sepal_width            2.8                                    3           3  0.014494934016846508   0.5763578348071681 0.01352,0.01449,0.00000 0.00036,0.57636,0.00000           2,          3,          1
             5  4.126450132910118       3           2  0.09316033548526025 sepal_length           5.0                                    2           2  0.009803921568640808  0.08335641391661944 0.00980,0.00700,0.00362 0.08336,0.00000,0.00000           2,          3,          1

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.