LARPredict Example 1: Model ('diabetes_lars') - 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ā„¢

Input

diabetes_test
id age sex bmi map tc ldl hdl tch ltg glu y
3 0.0852989 0.0506801 0.0444512 -0.00567061 -0.0455994 -0.0341945 -0.0323559 -0.00259226 0.00286377 -0.0259303 141
6 -0.0926955 -0.0446416 -0.0406959 -0.0194421 -0.0689906 -0.0792878 0.0412768 -0.0763945 -0.0411804 -0.0963462 97
8 0.0635037 0.0506801 -0.00189471 0.0666297 0.0906199 0.108914 0.0228686 0.0177034 -0.0358167 0.00306441 63
13 0.0162807 -0.0446416 -0.02884 -0.00911348 -0.00432087 -0.00976889 0.0449585 -0.0394934 -0.0307512 -0.0424988 179
14 0.00538306 0.0506801 -0.00189471 0.00810087 -0.00432087 -0.0157187 -0.00290283 -0.00259226 0.0383932 -0.013504 185
17 -0.00551456 -0.0446416 0.0422956 0.0494153 0.0245741 -0.0238606 0.0744116 -0.0394934 0.05228 0.0279171 166
26 -0.0672677 0.0506801 -0.0126728 -0.0400993 -0.0153285 0.00463594 -0.0581274 0.0343089 0.019199 -0.0342146 202
28 -0.0236772 -0.0446416 0.0595406 -0.0400993 -0.0428475 -0.0435889 0.0118237 -0.0394934 -0.0159983 0.0403434 85
30 0.0671362 0.0506801 -0.00620595 0.0631868 -0.0428475 -0.0958847 0.0523217 -0.0763945 0.0594238 0.0527697 283
33 0.0344434 0.0506801 0.125287 0.0287581 -0.0538552 -0.0129004 -0.102307 0.108111 0.000271486 0.0279171 341
35 0.0162807 -0.0446416 -0.06333 -0.0573137 -0.057983 -0.0489124 0.00814208 -0.0394934 -0.0594727 -0.0673514 65
... ... ... ... ... ... -0.0341945 -0.0323559 -0.00259226 0.00286377 -0.0259303 141

SQL Call

SELECT * FROM LARPredict (
  ON diabetes_test AS data PARTITION BY ANY
  ON diabetes_lars AS model DIMENSION
  USING
  CoefMode ('step')
  CoefPositions (1.6)
  ResponseColumn ('y')
) AS dt ORDER BY id;

Output

Columns
id age sex bmi map tc ldl hdl tch ltg glu y prediction_1.6
3 0.0852989 0.0506801 0.0444512 -0.00567061 -0.0455994 -0.0341945 -0.0323559 -0.00259226 0.00286377 -0.0259303 141 153.737
6 -0.0926955 -0.0446416 -0.0406959 -0.0194421 -0.0689906 -0.0792878 0.0412768 -0.0763945 -0.0411804 -0.0963462 97 150.666
8 0.0635037 0.0506801 -0.00189471 0.0666297 0.0906199 0.108914 0.0228686 0.0177034 -0.0358167 0.00306441 63 152.065
13 0.0162807 -0.0446416 -0.02884 -0.00911348 -0.00432087 -0.00976889 0.0449585 -0.0394934 -0.0307512 -0.0424988 179 151.093
... ... ... ... ... ... ... ... ... ... ... ... ...