NorskRegnesentral / shapr

Explaining the output of machine learning models with more accurately estimated Shapley values
https://norskregnesentral.github.io/shapr/
Other
141 stars 33 forks source link

Shapley values for interactions between variables #316

Open lang-benjamin opened 1 year ago

lang-benjamin commented 1 year ago

Will shapley interaction values be supported in the next release?

martinju commented 1 year ago

Hi! We have not planned to include it. However, technically it should not be very difficult. I will therefore write it down on the lengthy "nice to have" list. Thanks!

lang-benjamin commented 1 year ago

Thank you. This is much appreciated, having the interactions could be very helpful for certain investigations. Another thought: since run-time will be a potential issue, it could make sense to have an option to specify only a certain subset of variables. Also, in some situations one might only be interested in a very specific order of interactions, e.g. between x1 and x2, x1 and x3, x1 and x4 etc. (ie interactions only to a certain reference variable).

martinju commented 1 year ago

I have little experience with Shapley interaction values, so I guess I have to read up on it, but is what you are suggesting actually possible? We are using the least-squares analog of the Shapley formula (KernelSHAP) for estimating the Shapley values in this package, and there I can't really decide to leave out any of the Shapley values from the computation...?

lang-benjamin commented 1 year ago

Right, I just had run-time in mind. I agree with you, I don't think it will work to easily restrict it to a subset of variables.