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

Lucas/wip #48

Merged
merged 4 commits into from Jul 29, 2021
Merged

Lucas/wip #48

merged 4 commits into from Jul 29, 2021

Conversation

lucashervier
Copy link
Collaborator

Point of this PR is to close #47.

Attributions

In 65676ec is all the neccessary change towards Lime in order to make it works properly with tabular data as inputs. Mainly, we detect if inputs are tabular data or has channels in order to appropriately attributes the right default mapping function and the way to apply masks.

Considering Occlusion less changes were required (feea923). Only to adapt the way to build masks and to apply them depending of the inputs shape.

6899e89 make a few change considering KernelShap in order to perfectly fit Lime framework. Moreover, a trick was used in order to obtain the shape of a Ragged Tensor (instead of using len(interpret_samples[0])

Tests

The commit 0d7f3f4 create a generic test to see if most attribution methods works with tabular data in several configurations.

Note:

  • For tabular data GradCAM and GradCAMPP are not applicable (because it works with a convulotional layer)
  • At present, we did not find a smart way to apply Rise to tabular data

Copy link
Member

@fel-thomas fel-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always, super good ;)
I let you fix my comments and rebase. I will try to pass on Lime soon to see if we can make it shorter.

xplique/attributions/lime.py Show resolved Hide resolved
xplique/attributions/lime.py Show resolved Hide resolved
xplique/attributions/lime.py Show resolved Hide resolved
tests/attributions/test_occlusion.py Show resolved Hide resolved
xplique/attributions/occlusion.py Show resolved Hide resolved
tests/attributions/test_tabular_data.py Show resolved Hide resolved
tests/attributions/test_tabular_data.py Show resolved Hide resolved
tests/attributions/test_tabular_data.py Show resolved Hide resolved
tests/attributions/test_tabular_data.py Show resolved Hide resolved
tests/utils.py Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

attributions: adapt api for tabular data
2 participants