Input
- housing_test, as in GLMPredict_MLE Example: Gaussian Distribution Prediction
- glm_ps_housing_1, output by GLMPerSegment Example: Regression, Family ('GAUSSIAN')
SQL Call
SELECT * FROM GLMPredictPerSegment ( ON housing_test PARTITION BY homestyle ON glm_ps_housing_1 AS Model PARTITION BY homestyle USING Accumulate ('sn','homestyle','price') ) AS dt ORDER BY sn;
Output
sn homestyle price prediction error_code --- --------- -------- ------------------ ---------- 13 classic 27000.0 41792.71049452186 NULL 16 classic 37900.0 42911.6990886487 NULL 25 classic 42000.0 39637.52745046294 NULL 38 eclectic 67000.0 78544.34514033666 NULL 53 eclectic 68000.0 65694.99777783247 NULL 104 bungalow 132000.0 126874.4187852145 NULL 111 classic 43000.0 39226.68979829896 NULL 117 eclectic 93000.0 68270.04132155296 NULL 132 classic 44500.0 41793.94508180405 NULL ...
Download a zip file of all examples and a SQL script file that creates their input tables.