7.00.02 - Compute Unnormalized Shapley Values from CVS and ACVS Table - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
SELECT player, SUM(partial_avg) / 5 AS shapley_value FROM (
  SELECT player, size, SUM(partial_value) AS partial_avg FROM (
    SELECT player,
      (atrbtn_cvs.value - atrbtn_acvs.value) / divisor AS partial_value,
       atrbtn_acvs.size AS size
       FROM atrbtn_cvs INNER JOIN atrbtn_acvs
         ON (atrbtn_cvs.comb = atrbtn_acvs.comb2)
  ) AS stratum
  GROUP BY player, size) AS stratum_avg
GROUP BY player ORDER BY player;