Releases: mmschlk/shapiq
v1.0.1 (2024-06-05)
shapiq v1.0.0 (2024-06-04)
Major release of the shapiq
Python package including (among others):
approximator
module implements over 10 approximators of Shapley values and interaction indices.exact
module implements a computer for over 10 game theoretic concepts like interaction indices or generalized values.games
module implements over 10 application benchmarks for the approximators.explainer
module includes aTabularExplainer
andTreeExplainer
for any-order feature interactions of machine learning model predictions.interaction_values
module implements a data class to store and analyze interaction values.plot
module allows visualizing interaction values.datasets
module loads datasets for testing and examples.
Documentation of shapiq
with tutorials and API reference is available at https://shapiq.readthedocs.io
Update v.0.0.6-alpha
Highlights
The highlights of this release are as follows.
Random Forest Support for TreeExplainer
We add support for RandomForestClassifier
and RandomForestRegressor
as provided by sklearn.ensemble
in the TreeExplainer
. This is discussed in #55.
TreeExplainer Bugfix
We fix a package-breaking bug that made it impossible to use the TreeExplainer
class.
Additional Unittests
We add additional unittests that fully covers the TreeExplainer
in its current form.
What's Changed
Full Changelog: v.0.0.5-alpha...v.0.0.6-alpha
Update v.0.0.5-alpha
Highlights
Since the last release already is some time back, lot's has changed. The highlights are as follows:
TreeExplainer based on TreeSHAP-IQ
shapiq
now is equipped with a TreeExplainer
. The TreeExplainer
is based on the TreeSHAP-IQ algorithm proposed in this paper. It is a model-specific method to compute Shapley interactions of all kinds and any-order. Since it is based on the linear TreeSHAP algorithm it is quite fast. The work is not yet finished on the TreeExplainer, since it only accepts very basic tree models from sklearn as input. More to follow on this front.
The first visualizations are added.
We added a new plot to the visualizations: the stacked bar chart (underwhelming name). This plot is illustrated in the TreeSHAP-IQ paper and Sebastian Bordt and Ulrike von Luxburg's AISTATS paper. The stacked bar charts shows how much interaction is present in a specific instance and is based on the k-SII
values.
Major Refactoring
The codebase has changed quite drastically and many objects have been renamed (e.g. InteractionExplainer
has been renamed to Tabular Explainer
to better fit the more specific intend of this class). The InteractionValues
(the main data structure of the package) has become much more powerful. You can now multiply scalar values to the interaction scores and even add two objects together.
Welcoming new Collaborators
We still are looking for all the help that we can get! If you want to contribute please check out the tutorial and our project.
What's Changed
- Add nSII and SII Regression Estimator by @mmschlk in #22
- Merge Dev by @mmschlk in #23
- Add initial explainer. by @mmschlk in #25
- Development by @mmschlk in #27
- Merge by @mmschlk in #28
- Add additional Tests by @mmschlk in #29
- Adds Stacked Bar Plot and tidyies up Network Plot. by @mmschlk in #41
- Renamed nSII to k-SII and refactors base approximators by @mmschlk in #42
- Add Collaborator Tutorial and Code of Conduct by @mmschlk in #46
- adds code-quality check and closes #45 by @mmschlk in #47
- adds TreeExplainer with TreeSHAP-IQ by @mmschlk in #51
Full Changelog: v.0.0.4-alpha...v.0.0.5-alpha
Update v.0.0.4-alpha
New Approximators
This release adds new approximation methods to shapiq
and makes all interaction calculations faster and more memory efficient.
ShapIQ approximator
This release adds the shapiq.approximator.ShapIQ
approximator as proposed in this paper (NeurIPS'23).
ShapIQ
can approximate any cardinal interaction index (CII) like the Shapley Interaction Index (SII), the Shapley Taylor Index (STI), or the Faithful Shapley Interaction index (FSI).
Regression Estimator for FSI
The shapiq.approximator.RegressionFSI
regression estimator, which is only available for FSI, was proposed in this paper (JMLR'23). It is similar to KernelSHAP in that it leverages a weighted least squares representation for the interaction index and solves this by estimating this regression problem.
Permutation Sampling for STI
The permutation sampling currently implemented for the SII (shapiq.approximator.PermutationSamplingSII
) can also be extended to the STI. The new shapiq.approximator.PermutationSamplingSTI
uses the traditional permutation sampling approach to compute STI scores.
List of PRs
- Add FSI and STI approximation methods by @mmschlk in #7
- Add SHAP-IQ approximator by @mmschlk in #10
- Tests and Efficiency by @mmschlk in #18
- Updates docs. by @mmschlk in #20
Full Changelog: v0.0.3-alpha...v.0.0.4-alpha
Update v.0.0.3-alpha
0.0.2
Adds network plot functionality and updates docs. This release is mainly used to test the workflows and publish of docs and automatic update to pypi.