GLMPredictPerSegment Example: Regression | Teradata Vantage - GLMPredictPerSegment Example: Regression - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

SQL Call

SELECT * FROM GLMPredictPerSegment (
  ON housing_test PARTITION BY homestyle
  ON glm_ps_housing_2 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 28121.93106958178  NULL      
 16 classic    37900.0 28122.524114897366 NULL      
 25 classic    42000.0 28123.232973776263 NULL      
 38 eclectic   67000.0 73138.03412830898  NULL      
 53 eclectic   68000.0 73903.82922281937  NULL      
104 bungalow  132000.0 20868.46290303957  NULL      
111 classic    43000.0 28123.27929920159  NULL  
...

Download a zip file of all examples and a SQL script file that creates their input tables.