Comments (1)
Thanks for the report. Here is a version of your code that is better reproducible:
import shap
import numpy as np
# Plot the SHAP values for the Malignant case
expected_value = -0.43953
shap_values = np.array([ 0. , 0. , 0.25509583, 0.23371664, 0. ,
0. , 0. , 0. , 0. , 0. ,
0. , 0.01199562, 0. , -0.09863244, 0.01999477,
0. , 0. , 0. , 0. , 0. ,
0.02997689, 0. , 0.11880713, -2.51902776, 0. ,
0. , 0. , 0. , 0. , 0. ])
X_test = np.array(
[1.940e+01, 2.350e+01, 1.291e+02, 1.155e+03, 1.027e-01, 1.558e-01,
2.049e-01, 8.886e-02, 1.978e-01, 6.000e-02, 5.243e-01, 1.802e+00,
4.037e+00, 6.041e+01, 1.061e-02, 3.252e-02, 3.915e-02, 1.559e-02,
2.186e-02, 3.949e-03, 2.165e+01, 3.053e+01, 1.449e+02, 1.417e+03,
1.463e-01, 2.968e-01, 3.458e-01, 1.564e-01, 2.920e-01, 7.614e-02]
)
plot = shap.force_plot(expected_value,
shap_values,
X_test,
link="logit",
matplotlib=True)
But for me that works on master. Could you please also post the error message?
Edit: this is possibly related to #3448
from shap.
Related Issues (20)
- [Meta issue] Release 0.44.1 HOT 2
- shap installation failed; python version- 3.12.1 HOT 2
- MAINT: notebooks job intermittently failing on CI HOT 3
- ENH: Add Named Entity Recognition (NER) HOT 1
- AttributeError: 'Sequential' object has no attribute 'predict' HOT 1
- BUG: Python kernel crashes at importing SHAP
- Provided model function fails when applied to the provided data set.BUG: HOT 2
- BUG: AttributeError when using CatBoost with columns containing special characters
- BUG: Pytorch DeepExplainer SHAP explanations do not sum up to the model's output HOT 3
- BUG:
- BUG: NaN values created flattened Beeswarms HOT 1
- BUG: XGBRFRegressor invalid number of trees error with shap>=0.42 HOT 3
- BUG: TreeSHAP Interventional explanations segmentation fault HOT 3
- BUG: Problem of dimension during KernelExplainer HOT 6
- ENH: Not showing nan values on Beeswarm or violin plots
- BUG: Discrepancy among SHAP beeswarm and Seaborn swarmplots
- Intrepreting Siamese Network using SHAP values HOT 5
- ENH: Support SeLU activations for Tensorflow DeepExplainer
- BUG: AssertionError: The SHAP explanations do not sum up to the model's output HOT 1
- [Meta-issue] deprecation tracker for upcoming releases HOT 2
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.