1.0 - 8.00 - 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
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

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