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 the VAEAC approach #369

Merged
merged 225 commits into from
Mar 5, 2024
Merged

Conversation

LHBO
Copy link
Collaborator

@LHBO LHBO commented Dec 21, 2023

In this pull request, we add the vaeac (variational autoencoder with arbitrary conditioning) approach for estimating the conditional Shapley values. The vaeac approach allows for imputing missing values for arbitrary coalitions using a single variational autoencoder. Additionally, the approach supports mixed data. Finally, we have implemented the approach in torch for R.

The vaeac approach was introduced by Olsen et al. (2022), but they only provided a python implementation built on top of the shapr package.

Key points in this pull request are the following:

  1. Implemented the vaeac methodology in native torch in R.
  2. Incorporated the vaeac approach into the shapr package as an additional method that supports mixed data.
  3. Added verbose level to shapr, which allows the user to specify the degree of messages that will be given. This is in addition to progressr's progress bar.
  4. Added functionality for sending a pre-trained vaeac model to explain() and for continuing to train the vaeac model for additional epochs if a user is unsatisfied with the accuracy.
  5. Added plot functions for monitoring the performance of the vaeac approach.
  6. Added plot_SV_several_approaches(), which allows us to plot and compare several Shapley value explanations for the same explicands simultaneously.
  7. Added a vignette specifically for the vaeac approach to demonstrate its capabilities and how to use it, in addition to some extra sections/paragraphs in the main vignette.
  8. Changed how the vignettes are built to speed up the time. Now, we have to build them manually.
  9. Added support for GPU. However, the CPU is often comparable/faster for smaller datasets.

Copy link
Collaborator Author

@LHBO LHBO left a comment

Choose a reason for hiding this comment

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

Fixed all comments

Copy link
Member

@martinju martinju left a comment

Choose a reason for hiding this comment

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

This looks good. Will just run a few test locally, before we merge. Seems that you fixed a typo with another typo. You can just click accept on these and the code will be updated directly on github.

vignettes/understanding_shapr.Rmd Outdated Show resolved Hide resolved
vignettes/understanding_shapr.Rmd.orig Outdated Show resolved Hide resolved
@martinju martinju merged commit ab26e0b into NorskRegnesentral:master Mar 5, 2024
7 checks passed
@LHBO LHBO deleted the Lars/VAEAC_SHAPR branch April 20, 2024 14:10
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.

2 participants