Adding more explantation methods
youssefmecky96 opened this issue · comments
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 ?
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!