GLM2Predict Example 3: Lambda - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example specifies the lambda value for the function to use to make predictions.

Input

SQL Call

SELECT * FROM GLM2Predict (
  ON glm2_elastic_net AS "input" PARTITION BY ANY
  ON glm2_elastic_net_2model AS model DIMENSION ORDER BY "category"
  ON glm2_4regularization AS regularization DIMENSION
  USING
  Lambda (0.08)
  Accumulate ('years')
) AS dt;

Output

The column reqlambda contains the lambda value specified in the function call. The column matchlambda contains the lambda value from the regularization table that is closest to the specified lambda value. The prediction is based on the matchlambda value.

year reqlambda matchlambda prediction
1947 0.08 0.08 59.8535034597256
1948 0.08 0.08 60.8829002182784
1949 0.08 0.08 60.8820302999021
1950 0.08 0.08 61.6403716672329
1951 0.08 0.08 63.4310398083475
1952 0.08 0.08 64.1020378021382
1953 0.08 0.08 64.6471801473782
1954 0.08 0.08 64.6785991667163
1955 0.08 0.08 65.5656274176636
1956 0.08 0.08 66.3515363855062
1957 0.08 0.08 67.2411366517317
1958 0.08 0.08 67.4928827126838
1959 0.08 0.08 68.552275426539
1960 0.08 0.08 69.1940427944872
1961 0.08 0.08 69.754203661846
1962 0.08 0.08 70.8026323797505