Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving H2o data frame

Tags:

r

h2o

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 )

like image 705
Karanam Krishna Avatar asked Jan 29 '19 09:01

Karanam Krishna


1 Answers

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)

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

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.

like image 100
phiver Avatar answered Oct 18 '22 09:10

phiver