Correlation Example 2: Omit PARTITION BY Clause - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
lmf1502735330121
Product Category
Teradata Vantage

This example omits the PARTITION BY clause, so the function determines the correlation values for the overall population and does not group the data by state.

SQL Call

SELECT * FROM CorrelationReduce (
  ON CorrelationMap (
    ON corr_input
    USING 
    TargetColumns ('[2:3]', 'employed:gdp', 'employed:unemployed', 'employed:armedforces')
    KeyName ('keys')
  ) PARTITION BY keys
) AS dt;

Output

corr value_col
gdp:gdp 1
gdpdeflator:gdp 1
gdpdeflator:gdpdeflator 1
employed:gdp 0.983552
employed:unemployed 0.502498
employed:armedforces 0.457307