alibi icon indicating copy to clipboard operation
alibi copied to clipboard

PDP variance feature importance

Open RobertSamoilescu opened this issue 1 year ago • 2 comments

This PR implements the method described here to compute feature importance and feature interactions.

The main idea for the computation of both measures is to analyse the variance of the partial dependence plots, thus the implementation relies on the PartialDependece explainer.

It also adds plotting functionalities for the feature importance and feature interactions. Furthermore, since it is recommended to analyse the results in tandem with the partial dependence plots, the explanation object is designed to be compatible with the pd_plot functionality.

RobertSamoilescu avatar Sep 14 '22 15:09 RobertSamoilescu

Codecov Report

Merging #758 (ca3067b) into master (313c760) will decrease coverage by 0.21%. The diff coverage is 41.89%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #758      +/-   ##
==========================================
- Coverage   75.72%   75.51%   -0.22%     
==========================================
  Files          72       73       +1     
  Lines        8223     8477     +254     
==========================================
+ Hits         6227     6401     +174     
- Misses       1996     2076      +80     
Flag Coverage Δ
macos-latest-3.10 75.47% <41.50%> (?)
macos-latest-3.10.6 ?
ubuntu-latest-3.10 75.47% <41.50%> (?)
ubuntu-latest-3.10.6 ?
ubuntu-latest-3.7 75.20% <41.26%> (-0.33%) :arrow_down:
ubuntu-latest-3.8 75.25% <41.26%> (-0.24%) :arrow_down:
ubuntu-latest-3.9 75.34% <41.26%> (-0.24%) :arrow_down:
windows-latest-3.9 73.41% <41.26%> (-0.18%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
alibi/explainers/pd_variance.py 40.72% <40.72%> (ø)
alibi/api/defaults.py 100.00% <100.00%> (ø)
alibi/explainers/__init__.py 100.00% <100.00%> (ø)
alibi/utils/missing_optional_dependency.py 94.44% <0.00%> (+0.15%) :arrow_up:
alibi/explainers/partial_dependence.py 48.16% <0.00%> (+0.21%) :arrow_up:
alibi/models/tensorflow/autoencoder.py 100.00% <0.00%> (+43.47%) :arrow_up:
alibi/models/tensorflow/cfrl_models.py 100.00% <0.00%> (+75.67%) :arrow_up:

codecov[bot] avatar Sep 14 '22 16:09 codecov[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB