Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showWaterfall should accept the output of explainPredictions [feature request] #32

Open
areeves87 opened this issue Sep 27, 2018 · 0 comments

Comments

@areeves87
Copy link

areeves87 commented Sep 27, 2018

Each call to showWaterfall runs explainPredictions. For datasets with hundreds or thousands of columns, this is tedious. Runtime can be hours long. To expedite the function call, showWaterfall should also accept an explanations variable that references prediction breakdowns that have already been made, maybe like this:

showWaterfall2 = function(xgb.model, explainer, DMatrix, data.matrix, 
                         idx, type = "binary", threshold = 0.0001, 
                         limits = c(NA, NA), explanations = NULL){
        if(!is.null(explanations)){
                breakdown = explanations[idx,]
        } else{
                breakdown = explainPredictions(xgb.model, 
                                               explainer, 
                                               slice(DMatrix,as.integer(idx)))
        }
etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant