如何在h2o中重新分配model_id

时间:2018-01-22 17:50:11

标签: r h2o

有没有办法为AutoML / grid获得的现有h2o模型分配新的ID?

AUTO <- h2o.automl(training_frame = train,
                            x = input, y = "Sales",
                            fold_column = "Week",
                            seed = 1, max_models = 8)
model <- AUTO@leader

这些选项都不起作用:

model@model_id <- "new_model_id"
model@parameters$model_id <- "new_model_id"
model@allparameters$model_id <- "new_model_id"
attr(model, "model_id") <- "new_model_id"

当我尝试保存模型时,h2o会抛出错误:

model_path <- h2o.saveModel(model, path = getwd(), force = T)

Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page,  : 

ERROR MESSAGE:

Object 'new_model_id' not found for argument: model_id

我尝试做的甚至可能吗?谢谢!

1 个答案:

答案 0 :(得分:3)

此功能目前在R API中不可用,因此我在此处创建了一个jira票证:https://0xdata.atlassian.net/browse/PUBDEV-5248

但是,在Python API中,您可以执行

my_model.model_id = ‘my_new_model_id’
相关问题