Closed LHBO closed 6 months ago
Ok, did not realize something is up with the OLD vignette, lines 831-851. Will look at this tomorrow.
TODO to make checks pass:
TODO to make checks pass:
- [x] Install torch
- [x] LARS: Move from Boston MASS dataset to airquality (and rather make some variables categorical as in the tests). If we use the MASS package in the vignette, we need it as imports in DESCRIPTION, which we want avoid
- [x] LARS: plot_vaeac_training_evaluation does not exists? For now I just removed it from the vignette for it to build. Needs to handle that properly.
- [x] LARS: Add a vaeac.save_model option to explain which
- [x] Fix NSE warnings in checks
[x] LARS: Fix check warnings:
[x] Missing link or links in documentation of:
[x] SkipConnection: get_imputation_networks,
[x] Specified_masks_mask_generator: ‘row1, row1, row2, row2, row3, row3, ...’
[x] Specified_prob_mask_generator: ‘row1, row1, row2, row2, row3, row3, ...’
[x] Undocumented arguments in documentation object 'vaeac_continue_train_model': ‘explanation’ ‘...’
- [x] LARS: model.cuda in L1362 of approach.vaeac.R does not exists. What is the intention there?
Fixed all of these points. However, I am unsure if the package is installable here on Git. It runs fine on my Mac.
I fixed all comments sent by email and above. Refactored almost all the code and made separate functions for code that were identical in several places. We need to discuss verbose, but that should be done in a separate PR when we decide what the different levels actually mean.
Checked that all tests run (the check files must be updated) and added some global var in zzz file.
We must remember to update the text in the main vignette. E.g. in "examples" section vaeac
is not mentioned as a possible method.
In this pull request, we add the
vaeac
(variational autoencoder with arbitrary conditioning) approach for estimating the conditional Shapley values. Thevaeac
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 theshapr
package.Key points in this pull request are the following:
vaeac
methodology in nativetorch
in R.vaeac
approach into theshapr
package as an additional method that supports mixed data.verbose
level toshapr
, which allows the user to specify the degree of messages that will be given. This is in addition to progressr's progress bar.vaeac
model toexplain()
and for continuing to train thevaeac
model for additional epochs if a user is unsatisfied with the accuracy.vaeac
approach.plot_SV_several_approaches()
, which allows us to plot and compare several Shapley value explanations for the same explicands simultaneously.vaeac
approach to demonstrate its capabilities and how to use it, in addition to some extra sections/paragraphs in the main vignette.