shapley {TUvalues} | R Documentation |
Shapley value
Description
Calculate the Shapley value
Usage
shapley(characteristic_func, method = "exact", n_rep = 10000, n_players = 0)
Arguments
characteristic_func |
The valued function defined on the subsets of the number of players. |
method |
Method used to calculate the Shapley value. Valid methods are:
|
n_rep |
Only used if |
n_players |
Only used if |
Value
The Shapley value for each player.
Examples
n <- 3
v <- c(1,1,2,1,2,2,2)
shapley(v, method = "exact")
shapley(v, method = "appro", n_rep = 4000)
[Package TUvalues version 0.1.0 Index]