christophM / interpretable-ml-book

Book about interpretable machine learning
https://christophm.github.io/interpretable-ml-book/
Other
4.73k stars 1.05k forks source link

Monte-Carlo Shapley algorithm #275

Closed diegobatt closed 2 years ago

diegobatt commented 3 years ago

Addresses this issue

As described in the issue, I think that the description of the algorithm:

For each iteration, a random instance z is selected from the data and a random order of the features is generated. Two new instances are created by combining values from the instance of interest x and the sample z. The instance x+j is the instance of interest, but all values in the order before feature j are replaced by feature values from the sample z

was not represented correctly by the pseudocode. there was not a proper distinction between the feature vector ordered with the permutation o and the true original ordering.