Input
The InputTable is a combination of the attribute table and response table of DecisionTree Example 1.
pid | attribute | attrvalue | response |
---|---|---|---|
1 | petal_width | 0.2 | 1 |
1 | petal_length | 1.4 | 1 |
1 | sepal_width | 3.5 | 1 |
1 | sepal_length | 5.1 | 1 |
2 | petal_width | 0.2 | 1 |
2 | petal_length | 1.4 | 1 |
2 | sepal_width | 3 | 1 |
2 | sepal_length | 4.9 | 1 |
3 | petal_width | 0.2 | 1 |
3 | petal_length | 1.3 | 1 |
3 | sepal_width | 3.2 | 1 |
3 | sepal_length | 4.7 | 1 |
4 | petal_width | 0.2 | 1 |
SQL Call
DROP TABLE iris_attribute_output_2; DROP TABLE splits_small_2; SELECT * FROM DecisionTree ( ON iris_altinput AS InputTable OUT TABLE OutputTable (iris_attribute_output_2) OUT TABLE IntermediateSplitsTable (splits_small_2) USING NumSplits (3) SplitMeasure ('gini') MaxDepth (10) IDColumns ('pid') AttributeNameColumns ('attribute') AttributeValueColumn ('attrvalue') ResponseColumn ('response') MinNodeSize (10) ApproxSplits ('false') ) AS dt;
Output
message |
---|
Output model table is successfully stored in the table specified in OutputTable argument. Depth of the tree is:6 |
These queries return the attribute and the splits table (which are the same as in DecisionTree Example 1):
SELECT * FROM iris_attribute_output_2 ORDER BY 1; SELECT * FROM splits_small_2 ORDER BY 1;