CFilter Example 2: Collaborative Filtering by Customer Segment - 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™

In this example, JoinColumns = 'product'. The function tries to identify segments of customers that often purchase the same products.

Input

SQL Call

SELECT * FROM CFilter (
  ON sales_transaction AS InputTable
  OUT TABLE OutputTable (cfilter_output1)
  USING
  TargetColumns ('customer_segment')
  JoinColumns ('product')
) AS dt;

Output

This query returns the following table:

SELECT * FROM cfilter_output1 ORDER BY col1_item1, score;
cfilter_output1
col1_item1 col1_item2 cntb cnt1 cnt2 score support confidence lift z_score
Consumer Small Business 13 13 17 0.764705882352941 0.764705882352941 1 1 -0.98058067569092
Consumer Corporate 13 13 17 0.764705882352941 0.764705882352941 1 1 -0.98058067569092
Consumer Home Office 13 13 16 0.8125 0.764705882352941 1 1.0625 -0.98058067569092
Corporate Consumer 13 17 13 0.764705882352941 0.764705882352941 0.764705882352941 1 -0.98058067569092
Corporate Home Office 16 17 16 0.941176470588235 0.941176470588235 0.941176470588235 1 0.784464540552737
Corporate Small Business 17 17 17 1 1 1 1 1.37281294596729
Home Office Consumer 13 16 13 0.8125 0.764705882352941 0.8125 1.0625 -0.98058067569092
Home Office Small Business 16 16 17 0.941176470588235 0.941176470588235 1 1 0.784464540552737
Home Office Corporate 16 16 17 0.941176470588235 0.941176470588235 1 1 0.784464540552737
Small Business Consumer 13 17 13 0.764705882352941 0.764705882352941 0.764705882352941 1 -0.98058067569092
Small Business Home Office 16 17 16 0.941176470588235 0.941176470588235 0.941176470588235 1 0.784464540552737
Small Business Corporate 17 17 17 1 1 1 1 1.37281294596729