bgreenwell / fastshap

Fast approximate Shapley values in R
https://bgreenwell.github.io/fastshap/
112 stars 18 forks source link

Is it valid to aggregate fastshap values to sets of features? #43

Closed py3lee closed 2 years ago

py3lee commented 2 years ago

Can I check if it is valid to aggregate the fastshap values for related features?

Understand that this is not really an issue but more of a question, but I'm not quite sure where else to post this question as this only pertains to this package.

Appreciate your help on this! Thanks in advance!

bgreenwell commented 2 years ago

As long as you set adjust=TRUE then yes, I think it’s perfectly valid to sum the Shapley values across sets of rows or columns. Not sure it makes much sense to aggregate in any other way, such as in your bmi example. In that case, it would be more useful to model the features of interest to explain!

py3lee commented 2 years ago

That's great to know, thank you so much!