Examples | Linear Regression Function | Vantage Analytics Library - Examples - Vantage Analytics Library

Vantage Analytics Library User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Vantage Analytics Library
Release Number
2.2.0
Published
March 2023
Language
English (United States)
Last Update
2024-01-02
dita:mapPath
ibw1595473364329.ditamap
dita:ditavalPath
iup1603985291876.ditaval
dita:id
zyl1473786378775
Product Category
Teradata Vantage

Use Three Input Columns to Predict Income and Return Result Sets

Returns two result data sets, one with coefficients and statistics and one with statistical measures.

call td_analyze (
  'linear',
  'database = val_source;
   tablename = customer;
   columns = age, years_with_bank, nbr_children;
   dependent = income;'
);

Use Three Input Columns to Predict Income and Create Output Tables

Creates two permanent output tables, one with coefficients and statistics and one with statistical measures.

call td_analyze (
  'linear',
  'database = val_source;
   tablename = customer;
   columns = age, years_with_bank, nbr_children;
   dependent = income;
   outputdatabase = val_results;
   outputtablename = linear2;'
);

Build Eight Models

Because the groupby parameter specifies two columns, the function builds 2*4 = 8 models.

call td_analyze (
  'linear',
  'database = val_source;
   tablename = customer;
   columns = age, years_with_bank, nbr_children;
   dependent = income;
   outputdatabase = val_results;
   outputtablename = linear3;
   groupby = gender, marital_status;'
);