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

when there are many input features ,how to use the IntegratedGradients? #1312

Open
Sarah-air opened this issue Jul 18, 2024 · 1 comment
Open

Comments

@Sarah-air
Copy link

❓ Questions and Help

the classification model is classification_pred = model([input_x[0], input_x[1],input_x[2], input_x[3]], os_event.size(0),
 {'gex': 0, 'methy': 1, 'mut':2, 'cna': 3}),the input_x of one sample is as the figure showed,how to use the IntegratedGradients
to get the four features' attribution?image

@khairulislam
Copy link

Hi @Sarah-air , if your model uses all 4 inputs, then normal passing is fine. but if it doesn't, you'll have to pass only the inputs that your model uses to the attribute method as input and the rest as additional forward args. The Gradient method throws an error if any input is unused. Check our example here.

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