1.1 - 8.10 - Correlation Example: Omit PARTITION BY - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
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_item1  corr_item2  value_col
----------- ----------- ------------------
gdpdeflator gdp         1.0
armedforces employed    0.4573073983192444
unemployed  employed    0.5024980902671814
gdp         employed    0.9835516214370728
gdp         gdp         1.0
gdpdeflator gdpdeflator 1.0

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.