Input
housing_trainsn |
price |
lotsize |
bedrooms |
bathrms |
stories |
driveway |
recroom |
fullbase |
gashw |
airco |
garagepl |
prefarea |
homestyle |
76 |
36000 |
3180 |
3 |
1 |
1 |
no |
no |
no |
no |
no |
0 |
no |
classic |
40 |
54500 |
3150 |
2 |
2 |
1 |
no |
no |
yes |
no |
no |
0 |
no |
eclectic |
19 |
45000 |
3450 |
1 |
1 |
1 |
yes |
no |
no |
no |
no |
0 |
no |
bungalow |
55 |
38000 |
3630 |
3 |
3 |
2 |
no |
yes |
no |
no |
no |
0 |
no |
eclectic |
99 |
35000 |
3500 |
2 |
1 |
1 |
yes |
no |
no |
no |
no |
0 |
no |
eclectic |
SQL Call
CREATE MULTISET TABLE df_ps_1 AS (
SELECT * FROM DecisionForestPerSegment (
ON housing_train AS InputTable PARTITION BY airco
USING
ResponseColumn ('homestyle')
NumericInputs ('price','lotsize','bedrooms','bathrms','stories','garagepl')
CategoricalInputs ('driveway','recroom','fullbase','gashw','prefarea')
TreeType ('classification')
MaxDepth (6)
) AS dt
) WITH DATA;
Output
df_ps_1airco |
tree_num |
tree |
no |
1 |
Snippet:{"responseCounts_":{"classic":91,"bungal |
yes |
1 |
Snippet:{"responseCounts_":{"classic":91,"bungal |
no |
3 |
Snippet:{"responseCounts_":{"classic":71,"bungal |
yes |
3 |
Snippet:{"responseCounts_":{"classic":12,"bungal |
Download a zip file of all examples and a SQL script file that creates their input tables.