Learn R Programming

TUGLab (version 0.0.1)

coalitionweightedshapleyvalue: Coalition-weighted Shapley value

Description

Given a game and a weight family, this function returns the coalition-weighted Shapley value.

Usage

coalitionweightedshapleyvalue(v, delta, binary = FALSE, game = FALSE)

Value

The coalition-weighted Shapley value, as a vector. If game=TRUE, the coalition-weighted game is also returned, as a vector in binary order if binary=TRUE and in lexicographic order otherwise.

Arguments

v

A characteristic function, as a vector.

delta

A weight family. It can be introduced in two different ways: as a non-negative vector whose length is the number of coalitions (thus specifying all coalition weights) or as a non-negative vector whose length is the number of players (thus specifying the weights of single-player coalitions and implying that the rest of weights are 0). In any case, if the introduced weights do not add up to 1, the weight family is computed by normalization.

binary

A logical value. By default, binary=FALSE. Should be set to TRUE if v and delta (assuming delta was introduced by specifying all coalition weights; otherwise there is no difference) are introduced in binary order instead of lexicographic order.

game

A logical value. By default, game=FALSE. If set to TRUE, the coalition-weighted game is also returned.

Details

A weight family is a collection of \(2^{|N|}-1\) real numbers \(\delta=\{\delta_{T}\}_{T \in 2^{N} \setminus \emptyset}\) such that \(\delta_{T} \geqslant 0\) for each \(T \in 2^{N} \setminus \emptyset\) and \(\sum_{T \in 2^{N} \setminus \emptyset}\delta_{T}=1\). For each \(v \in G^{N}\) and each \(T \in 2^{N}\), the T-marginal game of \(v\), denoted \(v^{T} \in G^{N}\), is defined as $$v^{T}(S)=v(S \cup (N \setminus T))-v(N \setminus T)+v(S \cap (N \setminus T)), \ S \in 2^{N}.$$ For each game \(v \in G^{N}\) and each weight family \(\delta\), the \(\delta\)-weighted game \(v^{\delta} \in G^{N}\) is defined as $$v^{\delta} = \sum_{T \in 2^{N} \setminus \emptyset}\delta_{T}v^{T}.$$ Given a game \(v \in G^{N}\), its \(\delta\)-weighted Shapley value, \(\Phi^{\delta}(v)\), is the Shapley value of the \(\delta\)-weighted game: $$\Phi^{\delta}(v)=Sh(v^{\delta}).$$

References

Sánchez Rodríguez, E., Mirás Calvo, M. A., Quinteiro Sandomingo, C., & Núñez Lugilde, I. (2024). Coalition-weighted Shapley values. International Journal of Game Theory, 53, 547-577.

See Also

marginalgame, shapleyvalue, weightedshapleyvalue

Examples

Run this code
v <- c(0,0,0,0,0,0,1,0,0,1,3,4,6,8,10)
delta <- c(0.3,0.1,0,0.6,0,0,0,0,0,0,0,0,0,0,0)
coalitionweightedshapleyvalue(v, delta, binary=TRUE)

v <- c(0,0,0,0,0,0,0,0,1,4,1,3,6,8,10)
delta <- c(0.25,0.25,0.25,0.25)
a <- coalitionweightedshapleyvalue(v, delta, game=TRUE)
b <- coalitionweightedshapleyvalue(a$game, delta, game=TRUE)
c <- coalitionweightedshapleyvalue(b$game, delta, game=TRUE)
plotcoresets(rbind(v, a$game, b$game, c$game), imputations=FALSE)

# Games a, b and c have the same Shapley value:
all(sapply(list(a$value, b$value, c$value, shapleyvalue(v)),
           function(x) all.equal(x, a$value) == TRUE))

Run the code above in your browser using DataLab