The Shapley value is intended to reflect the importance of each player to the coalition in a cooperative game (a game between coalitions of players, rather than between individual players).
The Shapley value functions are:
- GenerateCombination, a function that takes combinations of players (coalitions) and generates input for AddOnePlayer
- SortCombination, a function that sorts combinations of players
- AddOnePlayer, a function that takes sorted combinations and outputs a table
- SQL Statements to Compute the Shapley Value, which query the AddOnePlayer input and output tables
The input to GenerateCombination can be either unsorted user data or sorted output from the function nPath. If the input is unsorted, GenerateCombination inputs it to SortCombination.
The input to SortCombination can come from either GenerateCombination or the user.
The input to AddOnePlayer can come from either GenerateCombination or SortCombination.