Open JJYsRepo opened 2 years ago
Hello!
We are using the original shapley value formula here:
Where if $S_p$ contains $i$, we want to subtract by one, since in the original formula $|S|$ does not include $i$. In words, at each leaf we are basically computing one of the terms in the above summation (if each path encounters each feature in the full set of features $N$, then it is exactly the same as the above summation).
The subtle part is that if we encounter fewer features ($N_p$) than are in the full game ($N$), then we can use a weighting term based on $N_p$, rather than all features $N$. This is just a consequence of the weighting term for which the numerator counts the number of combinations that correspond to the given set. Since the proportion of combinations is the same with all features $N$ and with the subset of features $N_p$, it is simpler to use $N_p$ instead.
How can we get the final result for calculating phi for path P? It seems to be a magic to me.
Thanks all.