TD_GLM Syntax | GLM | Teradata Vantage - TD_GLM Syntax - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantage™

TD_GLM Syntax Using Partition by Any

Important: In Analytics Database Release 17.20.03.14 and later, the AS InputTable alias is mandatory. If your scripts does not use an alias, use AS InputTable alias for the input table.
TD_GLM (
  ON { table | view | (query) } AS InputTable [ PARTITION BY ANY ]
  [ OUT TABLE MetaInformationTable (meta_table) ]
  USING
  InputColumns ({'input_column'|input_column_range }[,…])
  ResponseColumn('response_column')
  [ Family ('Gaussian' | 'Binomial') ] 
  [ BatchSize (batchsize) ]
  [ MaxIterNum (max_iter) ]
  [ RegularizationLambda (lambda) ]
  [ Alpha (alpha) ]
  [ IterNumNoChange (n_iter_no_change) ]
  [ Tolerance (tolerance) ]
  [ Intercept ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
  [ ClassWeights ('class:weight,...') ]
  [ LearningRate ('constant'|'optimal'|'invtime'|'adaptive') ]
  [ InitialEta (eta0) ]
  [ DecayRate (gamma) ]
  [ DecaySteps (decay_steps) ]
  [ Momentum (momentum) ]
  [ Nesterov ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
  [ LocalSGDIterations(local_iterations) ]
  [ StepwiseDirection ('forward'|'backward'|'both' | 'bidirectional')
  [ MaxStepsNum (max_stepwise_steps) ]
  [ InitialStepwiseColumns ({initialstate_columns | initialstate_column_range }[,...])]
)

TD_GLM Syntax Using Partition by Key

TD_GLM (
ON { table | view | (query) } AS InputTable PARTITION BY partition_by_column [ ORDER BY id_column ]
[ ON { table | view | (query) } AS AttributeTable PARTITION BY partition_by_column ]
[ ON { table | view | (query) } AS ParameterTable PARTITION BY partition_by_column ]
USING
InputColumns({'input_column'| input_column_range}[...])
ResponseColumn (response_column)
[ PartitionColumn ('partition_column') ]
[ Family (‘Gaussian’ | ‘Binomial’) ]
[ BatchSize (batchsize) ]
[ MaxIterNum (max_iter) ]
[ RegularizationLambda (lambda) ]
[ Alpha (alpha) ]
[ IterNumNoChange (n_iter_no_change) ]
[ Tolerance (tolerance) ]
[ Intercept ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
[ ClassWeights (‘class:weight,...’) ]
[ LearningRate (‘constant’|‘optimal’|’invtime’|’adaptive’) ]
[ InitialEta (eta0) ]
[ DecayRate (gamma) ]
[ DecaySteps (decay_steps) ]
[ Momentum (momentum) ]
[ Nesterov ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
[ IterationMode ('batch'|'epoch')]
)
You can call this function from:
  • The FROM clause of a SELECT statement
  • As part of a CREATE TABLE statement
  • As part of a CREATE VIEW statement