Uploaded image for project: 'Public H2O 3'
  1. PUBDEV-3782

Partial Plot: Errors out and doesn't compute all PDPs if one fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • CustomerVisible:
      No

      Description

      Backend does not throw an error or warning when it decides not to calculate a partial dependence plot. Once it's decided that pdp will not created for one feature in a supplied list of features, the other pdps plots are not calculated either. Example:

      prostate.hex = h2o.uploadFile(path = system.file("extdata", "prostate.csv", package="h2o"), destination_frame = "prostate.hex")
      prostate.hex[,"CAPSULE"] = as.factor(prostate.hex[, "CAPSULE"])
      ## Turn AGE and RACE to categoricals for testing purposes
      prostate.hex[,"AGE"] = as.factor(prostate.hex[, "AGE"])
      prostate.hex[,"RACE"] = as.factor(prostate.hex[, "RACE"])
      
      ## Build binary classification model
      prostate.gbm = h2o.gbm(x = c("AGE", "VOL", "RACE"), y = "CAPSULE", training_frame = prostate.hex, ntrees = 10, max_depth = 5, learn_rate = 0.1, "PROSTATE_GBM")
      
      ## PDP will fail for column RACE because nbin is set to 20 and there is 32 levels in the RACE column
      h2o.partialPlot(object = prostate.gbm, data =  prostate.hex, cols = c("AGE"), nbins = 20)
      h2o.partialPlot(object = prostate.gbm, data =  prostate.hex, cols = c("RACE"), nbins = 20)
      h2o.partialPlot(object = prostate.gbm, data =  prostate.hex, cols = c("VOL"), nbins = 20)
      
      ## Depending on the order of the features the request is submitted for, the returning PDP is different:
      h2o.partialPlot(object = prostate.gbm, data =  prostate.hex, cols = c("VOL" "RACE", "AGE"), nbins = 20)
      h2o.partialPlot(object = prostate.gbm, data =  prostate.hex, cols = c("VOL", "AGE", "RACE"), nbins = 20)
      
      

        Attachments

          Activity

            People

            • Assignee:
              AmyWang Amy Wang
              Reporter:
              AmyWang Amy Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: