1.0 - 8.00 - GLML1L2 Example 3: LASSO, Family ('GAUSSIAN') - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

Input

The input table is housing_train, as in GLM Example 3: Gaussian Distribution Analysis with Default Options.

SQL Call

Because the response variable has a Gaussian distribution, the call specifies Family ('GAUSSIAN'). Alpha (1) indicates L1 (LASSO) regularization.

DROP TABLE housing_model;
DROP TABLE housing_factor_table;

CREATE MULTISET TABLE housing_model AS (
  SELECT * FROM GLML1L2 (
    ON housing_train AS InputTable
    OUT TABLE FactorTable (housing_factor_table)
    USING
    FeatureColumns ('lotsize','bedrooms','bathrms','stories','garagepl','driveway',
      'recroom','fullbase','gashw','airco','prefarea','homestyle')
    CategoricalColumns ('driveway','recroom','fullbase','gashw','airco','prefarea','homestyle') 
    ResponseColumn ('price') 
    Family ('GAUSSIAN') 
    Alpha (1)
    Lambda (0.02)
    Randomization ('t')
  ) AS dt
) WITH DATA;

Output

housing_model
attribute category estimate information
(Intercept)   16975.5082421567 p
driveway yes 2822.64319583435 p
recroom yes 1208.48422621322 p
fullbase yes 3588.31635406472 p
gashw yes 5787.02116797583 p
airco yes 6478.76213487311 p
prefarea yes 6465.59515171777 p
homestyle Eclectic 16550.8330586448 p
homestyle bungalow 54128.4244993102 p
lotsize   2.08097633429999 p
bedrooms   782.136874756127 p
bathrms   6772.3377658822 p
stories   2445.64482074556 p
garagepl   1483.10124561545 p
Family     Gaussian
Regularization     Lasso
Alpha   1  
Lambda   0.02  
Iterations #   45  
Converged     true
Rows #   492  
Features #   13  
RMSE   10385.6617634216  
AIC   -8.99272582914559  
BIC   49.7859762017467  

(housing_factor_table not shown here.)