1.1 - 8.10 - Shapley Value Functions Example: nPath Creates ShapleyGenerateCombination - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Teradata Vantage
Release Number
October 2019
Content Type
Programming Reference
Publication ID
English (United States)

This example shows how to calculate Shapley Values using nPath to create the input to the ShapleyGenerateCombination function in the Shapley Value feature, using these steps:

  1. Use nPath to create conversion counts.
  2. Use nPath to create total counts.
  3. Compute the Shapley value for each player (CVS).
  4. Compute the augmented characteristic value table (ACVS).
  5. Compute the unnormalized Shapley values from the CVS and ACVS.

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