How to get sparse matrices into H2O?

后端 未结 1 1479
天涯浪人
天涯浪人 2020-12-20 17:18

I am trying to get a sparse matrix into H2O and I was wondering whether that was possible. Suppose we have the following:

test <- Matrix(c(1,0,0,1,1,1,1,0         


        
相关标签:
1条回答
  • 2020-12-20 18:02

    It is cumbersome to transport data stored in R's memory to H2O's memory for essentially two reasons: R performs a POST of the file to stream up the data into H2O, which 1) doesn't take advantage of H2O's parallel reader, and 2) limits your data to existing in R.

    Instead, make use of the h2o.importFile method from R to make use of H2O's parallel reader. Your data can live anywhere: HDFS, S3, regular filesystem...

    H2O sports an SVMLight reader, so it is recommended to save your sparse Matrix from R in svmlight format.

    Hope this helps!

    0 讨论(0)
提交回复
热议问题