iancovert / sage

For calculating global feature importance using Shapley values.
MIT License
255 stars 34 forks source link

add tensorflow #13

Closed AndresAlgaba closed 2 years ago

AndresAlgaba commented 2 years ago

Hi Ian, thanks for the wonderful work on the SAGE paper and the accompanying library! I noticed that there was not yet a tensorflow implementation inmodel_conversion() and therefore added it in this PR. I modified the airbnb notebook (in airbnb_tf) to show the workflow. I also added model.eval() to the pytorch conversion as I believe it should make it slightly faster. Let me know what you think of these changes, and whether some additional work is required!

iancovert commented 2 years ago

Hi Andres, sorry for the slow response! Thanks for contributing to the package, this is a great idea and a needed addition to the package! And the model.eval() call for PyTorch models was also a good call, I should have thought of that.

AndresAlgaba commented 2 years ago

No problem! My pleasure :)