【发布时间】:2019-10-04 12:35:01
【问题描述】:
根据 h2o 文档,我可以设置 keep_cross_validation_predictions = T 以从我的 automl 模型中获取交叉验证预测。
但我无法让它工作。
使用文档中的这个例子
library(h2o)
h2o.init()
# Import a sample binary outcome train/test set into H2O
train <- h2o.importFile("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv")
test <- h2o.importFile("https://s3.amazonaws.com/erin-data/higgs/higgs_test_5k.csv")
# Identify predictors and response
y <- "response"
x <- setdiff(names(train), y)
# For binary classification, response should be a factor
train[,y] <- as.factor(train[,y])
test[,y] <- as.factor(test[,y])
# Run AutoML for 20 base models (limited to 1 hour max runtime by default)
aml <- h2o.automl(x = x, y = y,
training_frame = train,
max_models = 20,
keep_cross_validation_predictions = TRUE,
seed = 1)
运行模型后,我尝试了
h2o.cross_validation_predictions(aml)
h2o.cross_validation_predictions(aml@leader)
h2o.cross_validation_holdout_predictions(aml)
h2o.cross_validation_holdout_predictions(aml@leader)
但这些都不起作用。
edit我使用的是最新的稳定版 3.24.02
【问题讨论】:
-
感谢您的提问@spore234。您能否说明您使用的是哪个版本的
h2o?