Comments (7)
That would not be a huge change, but it will need to be made in the JS code in IML. If it's important to you let me know, and I'll leave it here as a to-do when I get time. (or a PR to IML is also welcome)
from shap.
Thanks! I do think it would be super helpful. Our model has nearly 3,000 features, so visualizing the whole range for a single prediction is kind of difficult to read. I have tried to limit the number of features, though obviously that impacts the predicted score that is displayed, etc.
Something that essentially 'zooms in' on the area around the predicted score would be nice.
from shap.
from shap.
Apologies for the delay in getting back to you. Attached are two examples of the single prediction visualization using my ~3,000 features. The predictions are the same sample with the same feature set under two different LightGBM models.
I've anonymized the one displayed feature name, so I hope that doesn't impact anything on your end.
As you can see, there is quite the long-tail of minor contributors in the visualization, so the amount of information that can be retrieved by the viewer at this level of detail is quite low. It would be nice if there was a 'zoom' functionality that let us focus on the top-N features, or something similar to that. As I said before, I tried to do this artificially by recreating a truncated SHAP vector, but then the totals are obviously incorrect -- I suppose I could just sum all of the remaining feature contributions up into a single catch-all feature for both sides of the force diagram, but that seems like something that perhaps should be handled under the hood (and certainly not something that will work in general).
Separately, there have been some issues with placement of the names, though I fully realize part of that is due to their length. In this example, one model's visualization output can only fit a single name and the other didn't place any of the feature names.
from shap.
from shap.
This issue has been inactive for two years, so it's been automatically marked as 'stale'.
We value your input! If this issue is still relevant, please leave a comment below. This will remove the 'stale' label and keep it open.
If there's no activity in the next 90 days the issue will be closed.
from shap.
This issue has been automatically closed due to lack of recent activity.
Your input is important to us! Please feel free to open a new issue if the problem persists or becomes relevant again.
from shap.
Related Issues (20)
- ENH: Limiting number of CPU cores used by shap HOT 4
- [Meta issue] Release 0.45.0 HOT 5
- BUG: Waterfall feature names IndexError HOT 1
- BUG: DeepExplainer throws error when using `__call__`
- CI failing on tensorflow 2.16+ due to incompatibility between transformers & keras V3
- BUG: Output 0 of BackwardHookFunctionBackward is a view and is being modified inplace. This view was created inside a custom Function (or because an input was returned as-is) and the autograd logic to handle view+inplace would override the custom backward associated with the custom Function, leading to incorrect gradients. This behavior is forbidden. You can fix this by cloning the output of the custom Functio HOT 3
- ENH: Display worst features with barplot
- Allow shap to take list or dict as input HOT 3
- BUG: LightGBM with multiclass interaction TreeShap produces explainer error HOT 12
- ENH: Integrate Fasttreeshap speedup into SHAP HOT 2
- BUG: `base_score` attribute of the `XGBTreeModelLoader` is broken for all exponential losses (e.g. tweedie, poisson) HOT 4
- BUG: ERROR USING LLAMA-2 HOT 15
- BUG: 0.45.0 update breaks pytorch example on docs HOT 1
- x
- BUG: Error using Falcon for text-generation HOT 4
- BUG: Error when using DeepExplainer on LSTM Model HOT 1
- ENH: Partition Explainer for Video Models
- Does Feature/Column Order of dataset matter while calculating SHAP values? HOT 3
- When will the paddlepaddle framework be supported HOT 1
- BUG: LookupError: gradient registry has no entry for: shap_TensorListStack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shap.