Examples | Logistic Regression | 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

Required Parameters Only

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

Output Near Dependency Report

call td_analyze (
  'logistic',
  'database = val_source;
   tablename = customer;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;
   neardependencyreport = true;
   conditionindexthreshold = 3;
   varianceproportionthreshold = .3;'
);

Output and Show Output Tables

call td_analyze (
  'logistic',
  'database = val_source;
   tablename = customer;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;
   outputdatabase = val_results;
   outputtablename = logexample3;'
);
SELECT * FROM val_results.logexample3;
SELECT * FROM val_results.logexample3_rpt;
SELECT * FROM val_results.logexample3_txt;

Output and Show Output Tables with Row for Each groupby Column

call td_analyze (
  'logistic',
  'database = val_source;
   tablename = customer;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;
   outputdatabase = val_results;
   outputtablename = logexample4;
   groupby = gender, marital_status;'
);
SELECT * FROM val_results.logexample4 ORDER BY 1,2,3;
SELECT * FROM val_results.logexample4_rpt ORDER BY 1;
SELECT * FROM val_results.logexample4_txt ORDER BY 1,2,3;

Build Matrix with groupby Column and Select from It

call td_analyze (
  'matrix',
  'matrixtype = esscp;
   database = val_source;
   tablename = val_customer;
   columns = income, age, years_with_bank, nbr_children;
   outputdatabase = val_results;
   outputtablename = logmatrix1;'
);
SELECT * FROM val_results.logmatrix1 ORDER BY rownum;
call td_analyze (
  'logistic',
  'database = val_source;
   tablename = customer;
   matrixdatabase = val_results;
   matrixtablename = logmatrix1;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;'
);

Build Matrix with and Select from It

Example 6 shows a pre-built matrix with group by columns is used, with results selected for demonstrative purposes.

call td_analyze (
  'matrix',
  'matrixtype = esscp;
   database = val_source;
   tablename = customer;
   columns = income, age, years_with_bank, nbr_children;
   outputdatabase = val_results;
   outputtablename = logmatrix1GB;
   groupby = gender;'
);
SELECT * FROM val_results.logmatrix1GB ORDER BY gender, rownum;
call td_analyze (
  'logistic',
  'database = val_source;
   tablename = customer;
   matrixdatabase = val_results;
   matrixtablename = logmatrix1GB;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;
   groupby = gender;'
);

Output All XML Reports

call td_analyze (
  'logistic','
   database = val_source;
   tablename = customer;
   columns = income, age, years_with_bank;
   dependent = nbr_children;
   response = 0;
   statstable = true;
   successtable = true;
   thresholdtable = true;
   lifttable = true;'
);