Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more explantation methods #300

Open
youssefmecky96 opened this issue Oct 11, 2023 · 1 comment
Open

Adding more explantation methods #300

youssefmecky96 opened this issue Oct 11, 2023 · 1 comment

Comments

@youssefmecky96
Copy link

This is more of a question I checked
if I want to add LayerIntegratedGradients from captum or any other explanation method (for example pytorch forecasting library has built in attribution methods)
It seems to be that I should edit [quantus/helpers/constants.py] [quantus/functions/explanation_func.py] as long as I return a np.ndarray of same shape as inputs. Is there anything else or anywhere else I should also consider when adding these methods ?

@annahedstroem
Copy link
Member

annahedstroem commented Oct 23, 2023

Hey @youssefmecky96 thanks so much for your questions!

Yes, with the addition you describe, the following files are expecting an edit:

  • constants.py
  • explanation_func.py

but also, importantly add a test to see that it returns the correct shape and values in the correct places:

  • test_explanation_func.py

Also, make sure the captum arguments are included.

Otherwise, I'd look for the most similar captum method existing in the quantus.explain and start coding from there.

Let me know if you have any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants