I recently built breakdown plots for some of my caret prediction models using the DALEX package.
bd <- predict_parts(..., type = "break_down") plot(bd)
works fine in plain R and shiny, but I now need to bring these plots into a specific business intelligence tool. There's no problem creating a waterfall diagram there and no problem extracting variables and contributions from bd object in R.
But I can't figure out how to "tell" the BI tool the right order of variables in the breakdown plot. At first, I thougt field "position" would do this, but that gives the same order for all observations (not matching the R plot). I also tried predict_parts_break_down(), which resulted in different values for "position", but also did not match the order in the original R plots.
Does anybody know how to extract the correct order from the breakdown object?
I think that this must also be passed to the plot function in R somehow, but unfortunately I have not been able to get the corresponding source code of "plot" either.
Would be grateful for any help! Thanks!