入力
<DecisionTreePredictの入力例>を参照してください。
SQL呼び出し
CREATE MULTISET TABLE decisiontree_predict AS (
SELECT * FROM DecisionTreePredict (
ON iris_attribute_test AS AttributeTable PARTITION BY pid
ON iris_attribute_output as Model DIMENSION
USING
AttrTableGroupbyColumns ('attribute')
AttrTablePIDColumns ('pid')
AttrTableValColumn ('attrvalue')
) AS dt
) WITH DATA;
出力
このクエリーは、以下のテーブルを返します。
SELECT * FROM decisiontree_predict ORDER BY 1;
予測ラベル1、2、3は、species setosa、versicolor、virginicaに対応します。
| pid | pred_label |
|---|---|
| 5 | 1 |
| 10 | 1 |
| 15 | 1 |
| 20 | 1 |
| 25 | 1 |
| 30 | 1 |
| 35 | 1 |
| 40 | 1 |
| 45 | 1 |
| 50 | 1 |
| 55 | 2 |
| 60 | 2 |
| 65 | 2 |
| 70 | 2 |
| 75 | 2 |
| 80 | 2 |
| 85 | 2 |
| 90 | 2 |
| 95 | 2 |
| 100 | 2 |
| 105 | 3 |
| 110 | 3 |
| 115 | 3 |
| 120 | 2 |
| 125 | 3 |
| 130 | 2 |
| 135 | 2 |
| 140 | 3 |
| 145 | 3 |
| 150 | 3 |