Comments (5)
Hi,
I have a minimal example of the change in variable order:
library("DALEX")
library("iBreakDown")
set.seed(1313)
model_titanic_glm <- glm(survived ~ .,
data = titanic_imputed, family = "binomial")
explain_titanic_glm <- explain(model_titanic_glm,
data = titanic_imputed[,-8],
y = titanic_imputed$survived,
label = "glm")
bd_glm <- local_interactions(explain_titanic_glm, titanic_imputed[1, ], order=6:1)
bd_glm
bd_glm <- local_interactions(explain_titanic_glm, titanic_imputed[1, ], order=1:6)
bd_glm
bd_glm <- local_interactions(explain_titanic_glm, titanic_imputed[1, ], order=c('age:gender', 'class', 'embarked', 'fare', 'sibsp'))
bd_glm
bd_glm <- local_interactions(explain_titanic_glm, titanic_imputed[1, ], order=c('age:gender', 'embarked:class', 'sibsp:fare'))
bd_glm
Estimation of SHAP by repeating contributions over different orders is possible using the shap
function:
https://modeloriented.github.io/iBreakDown/reference/break_down_uncertainty.html
More on the topic of these methods can be found in the EMA e-book http://ema.drwhy.ai/shapley.html
from ibreakdown.
Thanks Hubert! I tried your example and it indeed works fine :) However, when passing an order with all variables and possible interactions, I do not get any interaction anymore but only the contributions of single variables. Is it that not all interactions can be passed to the function?
And thanks for pointing to the shap()
function! I had been using it but could not find how to calculate SHAP values for interactions with it? This is why I switched to the local_interaction()
function..
from ibreakdown.
I believe that each variable can be mentioned only once e.g. if 'age'
is apparent, then 'age:gender'
cannot be used. Additionally, I see that when passing interactions as strings, only one name convention is possible e.g. 'age:gender'
not 'gender:age'
.
As for SHAP with interactions, I think that it would be a great feature/method to consider.
from ibreakdown.
I see, thanks Hubert for the clarification! And so not all pairwise interactions can be assessed nor single and interactions.. That could also be a nice feature too :)
Looking forward to the shap interactions!
from ibreakdown.
I think this could remain open
from ibreakdown.
Related Issues (20)
- Ordered water fall plots (like shapviz)
- local_attributions fails for classification: incorrect number of subscripts on matrix HOT 10
- Differentely calculated diffs in local_attributions and local_interactions HOT 2
- Word cummulative does not exist. Change it to cumulative. HOT 1
- which LICENSE? HOT 1
- [shap] NA in variable_value column
- plot() incompatible with old objects HOT 1
- Wrong values in shap sign column
- move DLAEX to suggests in the CRAN version v1.2
- Hidden last contribution label in the break_down plot HOT 5
- add max_vars as an alias to max_features in plots
- plot() gives BD profiles for all target classes HOT 2
- plotD3.break_down plots within tabs apart from active tab do not load/size correctly HOT 5
- bug in plotting distributions on R3.6
- Error in shap on model with one variable
- More examples, and spellcheck HOT 1
- How can we apply model oriented ibreakdown to complete data set HOT 2
- Factor Variables Converted To Numeric Makes Results Less User Friendly HOT 3
- remove test dependency of `randomForest`, which requires R v4.1 to work
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 ibreakdown.