Input
The input table is housing_train, as in GLM Example: Gaussian Distribution Analysis.
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 TargetColumns ('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) RegularizationLambda (0.02) ) AS dt ) WITH DATA;
Output
SELECT * FROM housing_model;
attribute category estimate information -------------- -------- ------------------- ----------- AIC NULL -8.992753699712395 NULL Iterations # NULL 53.0 NULL stories NULL 2445.6699824701327 p bathrms NULL 6772.387864268141 p homestyle classic -54128.100924908955 p Alpha NULL 1.0 NULL homestyle eclectic -37577.28812836616 p prefarea yes 6465.606895601109 p Features # NULL 13.0 NULL airco yes 6478.800674992518 p Lambda NULL 0.02 NULL fullbase yes 3588.313479183023 p Family NULL NULL Gaussian recroom yes 1208.5016271782713 p Converged NULL NULL true bedrooms NULL 782.1333264902945 p Rows # NULL 492.0 NULL gashw yes 5787.049927907821 p driveway yes 2822.6466305663917 p Regularization NULL NULL Lasso RMSE NULL 10385.734127243657 NULL lotsize NULL 2.080984013010899 p BIC NULL 49.78594833117991 NULL (Intercept) NULL 71103.48563681456 p garagepl NULL 1483.1186058015555 p
(housing_factor_table not shown here.)
Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.