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

Error with h2o.explain #16475

Open
pedro-w opened this issue Jan 10, 2025 · 2 comments
Open

Error with h2o.explain #16475

pedro-w opened this issue Jan 10, 2025 · 2 comments
Labels

Comments

@pedro-w
Copy link

pedro-w commented Jan 10, 2025

H2O version, Operating System and Environment

  • H2O cluster version: 3.44.0.3
  • OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
  • R Version: R version 4.4.1 (2024-06-14 ucrt)
  • R studio 2024.12.0 Build 467
  • Windows 11 / x64

Actual behavior
Attempting to use h2o.explain on a h20.adaBoost model gives an error

Error in if (is.na(i)) NULL else x[, i] : argument is of length zero

Expected behavior

Error should not occur (tried with h2o.naiveBayes model and it worked successfully)

Steps to reproduce

  • Source minimal R script (below)
  • Error appears on console output
library(h2o)
h2o.init()
# Import the prostate dataset into H2O:
prostate <- h2o.importFile("https://s3.amazonaws.com/h2o-public-test-data/smalldata/prostate/prostate.csv")
predictors <- c("AGE","RACE","DPROS","DCAPS","PSA","VOL","GLEASON")
response <- "CAPSULE"
prostate[response] <- as.factor(prostate[response])
# Build and train the model:
adaboost_model <- h2o.adaBoost(nlearners=50,
                               learn_rate = 0.5,
                               weak_learner = "DRF",
                               x = predictors,
                               y = response,
                               training_frame = prostate)

# Generate predictions:
h2o.predict(adaboost_model, prostate)
# Explain model
h2o.explain(adaboost_model, prostate)
@pedro-w pedro-w added the bug label Jan 10, 2025
@tomasfryda
Copy link
Contributor

Thank you for reporting this issue. AdaBoost is currently does not support explain.

@pedro-w
Copy link
Author

pedro-w commented Jan 10, 2025

Thank you for the swift response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants