GLMPredictPerSegment Example: Regression, Family ('GAUSSIAN') | Teradata Vantage - GLMPredictPerSegment Example: Regression, Family ('GAUSSIAN') - 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_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.