h2oensemble 值 [[3L]](cond) 错误:参数 "training_frame" 必须是有效的 H2O H2OFrame 或 id
h2oensemble Error in value[[3L]](cond) : argument "training_frame" must be a valid H2O H2OFrame or id
在尝试从 Rstudio 中 运行 在 http://learn.h2o.ai/content/tutorials/ensembles-stacking/index.html 上找到的 H2OEnsemble 上的示例时,我遇到了以下错误:
Error in value[3L] :
argument "training_frame" must be a valid H2O H2OFrame or id
定义整体后
fit <- h2o.ensemble(x = x, y = y,
training_frame = train,
family = family,
learner = learner,
metalearner = metalearner,
cvControl = list(V = 5, shuffle = TRUE))
我安装了 h2o
和 h2oEnsemble
的最新版本,但问题仍然存在。我在这里 `h2o.cbind` accepts only of H2OFrame objects - R 了解到 h2o
中的命名约定随着时间的推移发生了变化,但我认为通过安装最新版本的两者,这应该不再是问题。
有什么建议吗?
library(readr)
library(h2oEnsemble) # Requires version >=0.0.4 of h2oEnsemble
library(cvAUC) # Used to calculate test set AUC (requires version >=1.0.1 of cvAUC)
localH2O <- h2o.init(nthreads = -1) # Start an H2O cluster with nthreads = num cores on your machine
# Import a sample binary outcome train/test set into R
train <- h2o.importFile("http://www.stat.berkeley.edu/~ledell/data/higgs_10k.csv")
test <- h2o.importFile("http://www.stat.berkeley.edu/~ledell/data/higgs_test_5k.csv")
y <- "C1"
x <- setdiff(names(train), y)
family <- "binomial"
#For binary classification, response should be a factor
train[,y] <- as.factor(train[,y])
test[,y] <- as.factor(test[,y])
# Specify the base learner library & the metalearner
learner <- c("h2o.glm.wrapper", "h2o.randomForest.wrapper",
"h2o.gbm.wrapper", "h2o.deeplearning.wrapper")
metalearner <- "h2o.deeplearning.wrapper"
# Train the ensemble using 5-fold CV to generate level-one data
# More CV folds will take longer to train, but should increase performance
fit <- h2o.ensemble(x = x, y = y,
training_frame = train,
family = family,
learner = learner,
metalearner = metalearner,
cvControl = list(V = 5, shuffle = TRUE))
这个错误是最近由对 h2o R 代码的 class 名称的批量 find/replace 更改引入的。更改也无意中应用于集成代码文件夹(我们目前在其中进行手动而不是自动测试——很快就会自动进行以防止此类事情发生)。我已经修复了这个错误。
要修复,请从 GitHub 重新安装 h2oEnsemble 包:
library(devtools)
install_github("h2oai/h2o-3/h2o-r/ensemble/h2oEnsemble-package")
感谢您的报告!为了更快地响应,post 错误和问题在这里:https://groups.google.com/forum/#!forum/h2ostream
在尝试从 Rstudio 中 运行 在 http://learn.h2o.ai/content/tutorials/ensembles-stacking/index.html 上找到的 H2OEnsemble 上的示例时,我遇到了以下错误:
Error in value[3L] : argument "training_frame" must be a valid H2O H2OFrame or id
定义整体后
fit <- h2o.ensemble(x = x, y = y,
training_frame = train,
family = family,
learner = learner,
metalearner = metalearner,
cvControl = list(V = 5, shuffle = TRUE))
我安装了 h2o
和 h2oEnsemble
的最新版本,但问题仍然存在。我在这里 `h2o.cbind` accepts only of H2OFrame objects - R 了解到 h2o
中的命名约定随着时间的推移发生了变化,但我认为通过安装最新版本的两者,这应该不再是问题。
有什么建议吗?
library(readr)
library(h2oEnsemble) # Requires version >=0.0.4 of h2oEnsemble
library(cvAUC) # Used to calculate test set AUC (requires version >=1.0.1 of cvAUC)
localH2O <- h2o.init(nthreads = -1) # Start an H2O cluster with nthreads = num cores on your machine
# Import a sample binary outcome train/test set into R
train <- h2o.importFile("http://www.stat.berkeley.edu/~ledell/data/higgs_10k.csv")
test <- h2o.importFile("http://www.stat.berkeley.edu/~ledell/data/higgs_test_5k.csv")
y <- "C1"
x <- setdiff(names(train), y)
family <- "binomial"
#For binary classification, response should be a factor
train[,y] <- as.factor(train[,y])
test[,y] <- as.factor(test[,y])
# Specify the base learner library & the metalearner
learner <- c("h2o.glm.wrapper", "h2o.randomForest.wrapper",
"h2o.gbm.wrapper", "h2o.deeplearning.wrapper")
metalearner <- "h2o.deeplearning.wrapper"
# Train the ensemble using 5-fold CV to generate level-one data
# More CV folds will take longer to train, but should increase performance
fit <- h2o.ensemble(x = x, y = y,
training_frame = train,
family = family,
learner = learner,
metalearner = metalearner,
cvControl = list(V = 5, shuffle = TRUE))
这个错误是最近由对 h2o R 代码的 class 名称的批量 find/replace 更改引入的。更改也无意中应用于集成代码文件夹(我们目前在其中进行手动而不是自动测试——很快就会自动进行以防止此类事情发生)。我已经修复了这个错误。
要修复,请从 GitHub 重新安装 h2oEnsemble 包:
library(devtools)
install_github("h2oai/h2o-3/h2o-r/ensemble/h2oEnsemble-package")
感谢您的报告!为了更快地响应,post 错误和问题在这里:https://groups.google.com/forum/#!forum/h2ostream