Comments (6)
I've updated DALEX again and now it works :)
It would be cool to have support for multiple models, so I'm leaving this issue open.
Hope Hubert will do it :)
from ibreakdown.
Multiple models in both plotD3 should now supported :)
from ibreakdown.
Thanks,
current plotD3 does not support multiple models (here models for 3 classes)
I hope that Hubert will fix it some day.
For now please use it for continuous variable or binary classification only
library("DALEX")
library("iBreakDown")
library("randomForest")
set.seed(1313)
model <- randomForest(status == "fired" ~ . , data = HR)
new_observation <- HR_test[1,]
explainer_rf <- explain(model,
data = HR[1:1000,1:5],
y = HR$status[1:1000] == "fired")
bd_rf <- local_attributions(explainer_rf,
new_observation)
plotD3(bd_rf)
from ibreakdown.
Thanks, but it seems to me, that it works only for regression. You obtain regression random forest in the example above.
iBreakDown doesn't work for binary classification.
library("DALEX")
library("iBreakDown")
library("randomForest")
set.seed(1313)
# I've added factor here in random forest
model <- randomForest(factor(status == "fired") ~ . , data = HR)
new_observation <- HR_test[1,]
explainer_rf <- explain(model,
data = HR[1:1000,1:5],
y = HR$status[1:1000] == "fired")
bd_rf <- local_attributions(explainer_rf,
new_observation)
plotD3(bd_rf)
from ibreakdown.
Would you please try DALEX in the latest version from GitHub (DALEX_0.2.7) ?
devtools::install_github("pbiecek/DALEX")
For binary classification, by default it takes scores only for the second class (I fixed it two days ago)
from ibreakdown.
Still the same. I've updated DALEX and iBreakdown
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Polish_Poland.1250 LC_CTYPE=Polish_Poland.1250
[3] LC_MONETARY=Polish_Poland.1250 LC_NUMERIC=C
[5] LC_TIME=Polish_Poland.1250
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] randomForest_4.6-14 iBreakDown_0.9.3 DALEX_0.2.7
loaded via a namespace (and not attached):
[1] jsonlite_1.6 splines_3.5.2 gtools_3.8.1 shiny_1.2.0
[5] assertthat_0.2.0 expm_0.999-3 sp_1.3-1 highr_0.7
[9] pdp_0.7.0 yaml_2.2.0 LearnBayes_2.15.1 r2d3_0.2.3
[13] pillar_1.3.1 lattice_0.20-38 glue_1.3.0 digest_0.6.18
[17] promises_1.0.1 colorspace_1.4-0 htmltools_0.3.6 httpuv_1.4.5.1
[21] Matrix_1.2-15 plyr_1.8.4 klaR_0.6-14 pkgconfig_2.0.2
[25] breakDown_0.1.6 questionr_0.7.0 gmodels_2.18.1 purrr_0.3.0
[29] xtable_1.8-3 mvtnorm_1.0-8 scales_1.0.0 gdata_2.18.0
[33] later_0.8.0 tibble_2.0.1 proxy_0.4-22 combinat_0.0-8
[37] ggplot2_3.1.0 ggpubr_0.2 ALEPlot_1.1 agricolae_1.3-0
[41] lazyeval_0.2.1 survival_2.43-3 magrittr_1.5 crayon_1.3.4
[45] mime_0.6 deldir_0.1-16 nlme_3.1-137 MASS_7.3-51.1
[49] class_7.3-14 tools_3.5.2 stringr_1.4.0 munsell_0.5.0
[53] cluster_2.0.7-1 compiler_3.5.2 e1071_1.7-0.1 rlang_0.3.1
[57] classInt_0.3-1 units_0.6-2 grid_3.5.2 rstudioapi_0.9.0
[61] htmlwidgets_1.3 miniUI_0.1.1.1 boot_1.3-20 gtable_0.2.0
[65] DBI_1.0.0 reshape2_1.4.3 AlgDesign_1.1-7.3 R6_2.4.0
[69] yaImpute_1.0-31 gridExtra_2.3 knitr_1.21 dplyr_0.8.0.1
[73] factorMerger_0.3.6 spdep_1.0-2 stringi_1.3.1 Rcpp_1.0.0
[77] sf_0.7-2 spData_0.3.0 tidyselect_0.2.5 xfun_0.5
[81] coda_0.19-2
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
- Aggregate local_interactions to estimate shap with interactions HOT 5
- 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.