Correlation Example 2: Omit PARTITION BY Clause - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
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