Skip to content

Commit

Permalink
updated release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmschlk committed Jan 15, 2025
1 parent 330bfdc commit 92b9412
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pip install shapiq
You can explain your model with `shapiq.explainer` and visualize Shapley interactions with `shapiq.plot`.
If you are interested in the underlying game theoretic algorithms, then check out the `shapiq.approximator` and `shapiq.games` modules.

### 📈 Compute any-order feature interactions
### Compute any-order feature interactions

Explain your models with Shapley interactions:

Expand Down Expand Up @@ -104,7 +104,7 @@ interaction_values.plot_force(feature_names=...)
<img width="800px" src="https://raw.githubusercontent.com/mmschlk/shapiq/main/docs/source/_static/images/motivation_sv_and_si.png" alt="An example Force Plot for the California Housing Dataset with Shapley Interactions">
</p>

### 📊 Visualize feature interactions
### Visualize feature interactions

A handy way of visualizing interaction scores up to order 2 are network plots.
You can see an example of such a plot below.
Expand All @@ -126,6 +126,26 @@ The pseudo-code above can produce the following plot (here also an image is adde
<img width="500px" src="https://raw.githubusercontent.com/mmschlk/shapiq/main/docs/source/_static/network_example2.png" alt="network_plot_example">
</p>

### Explain models not supported by SHAP

With ``shapiq`` you can also explain models that are not supported by SHAP.
For example, you can explain [TabPFN](https://github.com/PriorLabs/TabPFN) by making use of the _remove-and-recontextualize_ explanation paradigm implemented in ``shapiq.TabPFNExplainer``.

```python
import tabpfn, shapiq
X, y = ... # load your dataata
model = tabpfn.TabPFNClassifier()
model.fit(X, y)
explainer = shapiq.TabPFNExplainer(model=model, data=X, labels=y, index="FSII")
faithful_shapley_values = explainer.explain(X[0])
faithful_shapley_values.plot_force()
```

<p align="center">
<img width="700px" src="https://raw.githubusercontent.com/mmschlk/shapiq/main/docs/source/_static/images/fsii_tabpfn_force_plot_example.png" alt="Force Plot of FSII values as derived from the example tabpfn notebook">
</p>


## 📖 Documentation with tutorials
The documentation of ``shapiq`` can be found at https://shapiq.readthedocs.io.
If you are new to Shapley values or Shapley interactions, we recommend starting with the [introduction](https://shapiq.readthedocs.io/en/latest/introduction/) and the [basic tutorials](https://shapiq.readthedocs.io/en/latest/notebooks/basics.html).
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 92b9412

Please sign in to comment.