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

Understand Captum.ai better and how we want to utilize it. #15

Open
iamgiddyaboutgit opened this issue Apr 28, 2023 · 3 comments
Open
Assignees
Labels
decision question Further information is requested

Comments

@iamgiddyaboutgit
Copy link
Owner

https://captum.ai/docs/attribution_algorithms

@iamgiddyaboutgit iamgiddyaboutgit added question Further information is requested decision labels Apr 28, 2023
@jcoffsky3
Copy link
Collaborator

We probably want to focus on the primary attribution algorithms.

Homework uses the following code. We can adapt something similar:

from captum.attr import IntegratedGradients

model.eval()
integrated_gradients = IntegratedGradients(model)
ig = integrated_gradients.attribute(sample_features)
ig = torch.mean(ig, dim=1)
igs = ig.flatten().tolist()

We can then plot igs to see feature importance. Maybe (hopefully?) we will see something similar to the homework where certain features near each other on the plot have high importance, and we could reorder the features along the axis to highlight this

@iamgiddyaboutgit
Copy link
Owner Author

Sounds good! I need your statistical expertise here. Say Captum identifies a bunch of features that are important for the classification. Upon further analysis, we discover that a handful of these are also associated with Type 2 Diabetes Mellitus. How can we test that these double associations were unlikely to have occurred by chance?

@jcoffsky3
Copy link
Collaborator

That would normally be through hypothesis testing, I'm thinking we could use a proportion z test but we can look into it more after we have the captum results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants