This example uses a model built by a DecisionForestPerSegment call that specified an AttributeTable a ParameterTable.
Input
This example uses these input tables:
- Input table: housing_test, as in DecisionForestPredictPerSegment Example
- Model: df_ps_3, output by DecisionForestPerSegment Example: Specify AttributeTable or ParameterTable
SQL Call
SELECT * FROM DecisionForestPredictPerSegment ( ON housing_test PARTITION BY homestyle ON df_ps_3 AS Model PARTITION BY homestyle USING Accumulate ('sn','price') ) AS dt ORDER BY sn;
Output
homestyle | sn | price | prediction | error_code |
---|---|---|---|---|
classic | 13 | 27000 | 38971.666666666664 | NULL |
eclectic | 38 | 67000 | 65429.0395021645 | NULL |
bungalow | 104 | 132000 | 144033.3333333333 | NULL |
classic | 111 | 43000 | 46279.03544372295 | NULL |
Download a zip file of all examples and a SQL script file that creates their input tables.