Skip to content

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

Description

@areeves87

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions