Skip to content

Commit

Permalink
adds get_shap_values to README
Browse files Browse the repository at this point in the history
  • Loading branch information
oegedijk committed Dec 8, 2021
1 parent 35427f6 commit 79e8091
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@ store_test.csv

dashboard3.yaml
test.html
dashboard1.html
.gitignore
hub.html
db2.html
hub.zip
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ There are a few tricks to make this less painful:
number of trees, `L` is the maximum number of leaves in any tree and
`D` the maximal depth of any tree. So reducing the number of leaves or average
depth in the decision tree can really speed up SHAP calculations.
4. Plotting only a random sample of points. When you have a lots of observations,
4. Pre-computing shap values. Perhaps you already have calculated the shap values
somewhere, or you can calculate them off on a giant cluster somewhere, or
your model supports [GPU generated shap values](https://github.com/rapidsai/gputreeshap).
You can simply add these pre-calculated shap values to the explainer
with `explainer.set_shap_values()` and `explainer.set_shap_interaction_values()` methods.
5. Plotting only a random sample of points. When you have a lots of observations,
simply rendering the plots may get slow as well. You can pass the `plot_sample`
parameter to render a (different each time) random sample of observations
for the various scatter plots in the dashboard. E.g.:
Expand Down
8 changes: 8 additions & 0 deletions docs/source/hub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ If you pass ``integrate_dashboard_yamls=True``, then the configuration of the
dashboards get integrated into a single ``hub.yaml`` file instead of being
stored in separate files.

Storing to static html
======================

You can store the hub front-end and the underlying dashboards to static html with
e.g. `hub.to_html("hub.html")`. This will also generate individual `.html` files for
every dashboard e.g. `dashboard1.html`, `dashboard2.html`, etc, etc.

This might become a bit messy, so instead you can save straight to a zipfile with `hub.to_zip("hub.zip")`.

explainerhub CLI
================
Expand Down

0 comments on commit 79e8091

Please sign in to comment.