GLMPerSegment Example: Regression, Family ('BINOMIAL') | Teradata Vantage - GLMPerSegment Example: Logical Regression, Family ('BINOMIAL') - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

SQL Call

CREATE MULTISET TABLE glm_ps_admission AS (
  SELECT * FROM GlmPerSegment (
    ON admissions_train PARTITION BY masters
    USING
    TargetColumns ('programming','stats','gpa')
    CategoricalColumns ('programming','stats')
    ResponseColumn ('admitted')
    Family ('BINOMIAL') 
  ) AS dt
) WITH DATA;

Output

SELECT * FROM glm_ps_admission ORDER BY masters, attribute;
 masters |    attribute    | category |      estimate      | mean | std | information 
---------+-----------------+----------+--------------------+------+-----+-------------
 no      | (Intercept)     |          |   6.69033181140752 |      |     | p
 no      | gpa             |          |  0.148357437886138 |      |     | p
 no      | programming     | beginner |   1.93925023100405 |      |     | p
 no      | programming     | novice   |  -6.43475696921482 |      |     | p
 no      | stats           | beginner |  0.990402303801628 |      |     | p
 no      | stats           | novice   |  0.319900210236817 |      |     | p
 no      | programming     | advanced |                    |      |     | p
 no      | stats           | advanced |                    |      |     | p
 no      | Family          |          |                    |      |     | Binomial
 no      | Method          |          |                    |      |     | BFGS
 no      | Encoder         |          |                    |      |     | Onehot
 no      | Iterations #    |          |                145 |      |     | 
 no      | Converged       |          |                    |      |     | true
 no      | Rows #          |          |                 18 |      |     | 
 no      | Features #      |          |                  6 |      |     | 
 no      | Feature scaling |          |                    |      |     | false
 no      | AIC             |          |   20.3231618134613 |      |     | 
 no      | BIC             |          |   25.6653923608382 |      |     | 
 yes     | (Intercept)     |          |   2.18994683442621 |      |     | p
 yes     | gpa             |          | -0.483848653941822 |      |     | p
 yes     | programming     | beginner |  -1.69323043311475 |      |     | p
 yes     | programming     | novice   |  0.668167536176924 |      |     | p
 yes     | stats           | beginner |   0.28512997371383 |      |     | p
 yes     | stats           | novice   | -0.871130261624024 |      |     | p
 yes     | programming     | advanced |                    |      |     | p
 yes     | stats           | advanced |                    |      |     | p
 yes     | Family          |          |                    |      |     | Binomial
 yes     | Method          |          |                    |      |     | BFGS
 yes     | Encoder         |          |                    |      |     | Onehot
 yes     | Iterations #    |          |                 66 |      |     | 
 yes     | Converged       |          |                    |      |     | true
 yes     | Rows #          |          |                 22 |      |     | 
 yes     | Features #      |          |                  6 |      |     | 
 yes     | Feature scaling |          |                    |      |     | false
 yes     | AIC             |          |    36.539063508775 |      |     | 
 yes     | BIC             |          |   43.0853182289249 |      |     |