-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Fantastic code.
One question regarding ShapleyRegression() in "shapley.py", which I feel is explaining how iterative Kernel SHAP works.
In your paper "Improving KernelSHAP: Practical Shapley Value Estimation via Linear Regression" you are drawing coalition vectors
What I originally have thought:
"Let's draw
But when I read your code below (which I think is correct), then my thinking was actually wrong, because the Kernel Weight distribution does not appear at all in your code.
Was my thinking wrong?
# Weighting kernel (probability of each subset size).
num_players = game.players
weights = np.arange(1, num_players)
weights = 1 / (weights * (num_players - weights))
weights = weights / np.sum(weights)
[...]
num_included = np.random.choice(num_players - 1, size=batch_size,
p=weights) + 1
for row, num in zip(S, num_included):
inds = np.random.choice(num_players, size=num, replace=False)
row[inds] = 1Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels