h2o - 使用 R 中的 h2o 包保存模型时如何指定文件名

标签 h2o

我正在尝试使用以下函数保存模型构建:h2o.saveModel(),基于 H2O user manual for R 第 159 页上的函数描述,参数仅考虑path。我查看了其他类似的函数,例如: h2o.saveModelDetails() ,但它使用相同的参数。请告知是否有其他方法来指定模型名称。

最佳答案

模型文件的名称将由模型的 ID 确定。因此,如果您在训练模型时指定 model_id,则可以自定义它。目前,模型训练完成后无法更改其 ID。

文件保存后可以重命名:

h2o.saveModel(object = fit, path = path.value, force = TRUE) # force overwriting
name <- file.path(path.value, fileName) # destination file name at the same folder location
file.rename(file.path(path.value, fit@model_id), name)

关于h2o - 使用 R 中的 h2o 包保存模型时如何指定文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48833097/

相关文章:

Python h2o 框架到 np 数组 reshape

java - 所需端口 54321、54322 在 h2o 中的 R 上不可用错误

Python-h2o : How to specifiy column types correctly?

apache-spark - 如何将 H2OFrame 中的列转换为 python 列表?

python - 如何捕获未经训练的值 h2o python

r - 为什么 h2o.r2() 与手动计算的 R^2 不匹配?

r - 通过 R 中的 mlr 设置 h2o 的种子

python - 使用 H2O Automl 搜索的超参数值是什么?

r - 错误的欧几里得距离 H2O 计算 R

r - 检测 H2O 实例是否已经在 R 中运行