Skip to content

Commit 304a4cd

Browse files
authored
Merge pull request #442 from landonbutler/main
ProxySPEX Approximator
2 parents 830c6bc + 1f371da commit 304a4cd

File tree

13 files changed

+1427
-1057
lines changed

13 files changed

+1427
-1057
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ This restructuring aims to improve maintainability and development scalability.
2828
### Bugfixes
2929
- fixes a bug where RegressionFBII approximator was throwing an error when the index was `'BV'` or `'FBII'`.[#420](https://github.com/mmschlk/shapiq/pull/420)
3030

31+
### New Features
32+
- adds the ProxySPEX (Proxy Sparse Explanation) module in `approximator.sparse` for even more efficient computation of sparse interaction values [#442](https://github.com/mmschlk/shapiq/pull/442)
33+
3134
### Removed Features
3235
- removes the ability to load `InteractionValues` from pickle files. This is now deprecated and will be removed in the next release. Use `InteractionValues.save(..., as_json=True)` to save interaction values as JSON files instead. [#413](https://github.com/mmschlk/shapiq/issues/413)
3336
- removes `coalition_lookup` and `value_storage` properties from `shapiq.Game` since the seperated view on game values and coalitions they belong to is now outdated. Use the `shapiq.Game.game_values` dictionary instead. [#430](https://github.com/mmschlk/shapiq/pull/430)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,24 @@ fsii_values.plot_force() # plot the force plot
159159
<img width="800px" 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">
160160
</p>
161161

162-
### Use SPEX (SParse EXplainer) <img src="https://raw.githubusercontent.com/mmschlk/shapiq/main/docs/source/_static/images/spex_logo.png" alt="spex_logo" align="right" height="75px"/>
163-
For large-scale use-cases you can also check out the [👓``SPEX``](https://shapiq.readthedocs.io/en/latest/api/shapiq.approximator.sparse.html#shapiq.approximator.sparse.SPEX) approximator.
162+
### Use ProxySPEX (Proxy SParse EXplainer) <img src="https://raw.githubusercontent.com/mmschlk/shapiq/main/docs/source/_static/images/spex_logo.png" alt="spex_logo" align="right" height="75px"/>
163+
For large-scale use-cases you can also check out the [👓``ProxySPEX``](https://shapiq.readthedocs.io/en/latest/api/shapiq.approximator.sparse.html#shapiq.approximator.sparse.SPEX) approximator.
164164

165165
```python
166166
# load your data and model with large number of features
167167
data, model, n_features = ...
168168

169-
# use the SPEX approximator directly
170-
approximator = shapiq.SPEX(n=n_features, index="FBII", max_order=2)
169+
# use the ProxySPEX approximator directly
170+
approximator = shapiq.ProxySPEX(n=n_features, index="FBII", max_order=2)
171171
fbii_scores = approximator.approximate(budget=2000, game=model.predict)
172172

173-
# or use SPEX with an explainer
173+
# or use ProxySPEX with an explainer
174174
explainer = shapiq.Explainer(
175175
model=model,
176176
data=data,
177177
index="FBII",
178178
max_order=2,
179-
approximator="spex" # specify SPEX as approximator
179+
approximator="proxyspex" # specify ProxySPEX as approximator
180180
)
181181
explanation = explainer.explain(data[0])
182182
```

0 commit comments

Comments
 (0)