Member-only story
Game and Auction Theory for Data Scientists
Part 3 of 6: Cooperative Games and the Shapley Value, how to divide a joint result among its contributors, and why a feature attribution depends on a choice made before any Shapley value is computed. Python code provided.
Diogo Ribeiro is a mathematician, researcher and lecturer at the Faculdade de Media Artes e Design, Universidade Técnica do Porto. ORCID 0009–0001–2022–7072. GitHub diogoribeiro7. Gitlab diogoribeiro7.
The first two parts of this series were about players with separate objectives. Part 1 had two firms setting prices against each other, and Part 2 had an auditor and a fraudster with exactly opposed interests. This part is about the other half of game theory, in which a group produces a result together and the question is how much of it is due to each member.
Data scientists meet that question constantly, usually without the word “game” attached. Several marketing channels produce a number of conversions: how many belong to each channel? A model with forty features produces a prediction: how much of it comes from each feature? A model trained on ten thousand examples reaches a certain accuracy: what was each example worth? These are one problem, the problem of dividing the value of a cooperative game, and one solution to it dominates practice: the Shapley value.








