保存H2o数据帧 [英] Saving H2o data frame

查看:68
本文介绍了保存H2o数据帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用10GB的训练数据帧.我使用H2o库进行更快的计算.每次加载数据集时,我都应该将数据帧转换为需要大量时间的H2o对象.有没有办法存储转换后的H2o对象? (这样我每次在构建模型上进行跟踪时都可以跳过as.H2o(trainingset)步骤)

I am working with 10GB training data frame. I use H2o library for faster computation. Each time I load the dataset, I should convert the data frame into H2o object which is taking so much time. Is there a way to store the converted H2o object ? (so that i can skip the as.H2o(trainingset) step each time I make trails on building models )

推荐答案

使用as.h2o(trainingset)进行第一次转换后,您可以将文件导出/保存到磁盘,然后再次导入.

After the first transformation with as.h2o(trainingset) you can export / save the file to disk and later import it again.

my_h2o_training_file <- as.h2o(trainingset)
path <- "whatever/my/path/is"
h2o.exportFile(my_h2o_training_file , path = path)

当您要加载它时,请使用h2o.importFileh2o.importFolder.有关正确用法,请参见功能帮助.

And when you want to load it use either h2o.importFile or h2o.importFolder. See the function help for correct usage.

或者将文件另存为csv/txt,然后再使用as.h2o进行转换,并使用上述功能之一将其直接加载到h2o中.

Or save the file as csv / txt before you transform it with as.h2o and load it directly into h2o with one of the above functions.

这篇关于保存H2o数据帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆