1.0 - 8.00 - Shapley Value Functions Example 1 Step 1 - 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)

Step 1 creates payoff tables for each combination.

Different combinations of projects are created using the ShapleyGenerateCombination function on Shapley Value Functions Example 1 Input. The value column indicates the total cost (sum of capital cost and operating_cost) as specified in the SQL call.

SQL Call

CREATE MULTISET TABLE project_comb_cost AS (
  SELECT * FROM ShapleyGenerateCombination (
    ON (SELECT project_index, total_cost AS value_sh FROM project_cost)
  ) AS dt
) WITH DATA;

Output

comb size value
1 1 3000
2 1 13000
3 1 10000
1 2 2 14000
1 3 2 13000
2 3 2 19000
1 2 3 3 20000