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), nrow = 3, sparse = TRUE)
and assuming my local H2O is localH2O
, I can't seem to do the following:
as.h2o(test)
It gives the error: cannot coerce class "structure("dgCMatrix", package = "Matrix")" to a data.frame
. That seems to be pretty logical, however assuming that test is so big that I can't transform it into a dataframe, how am I suppose to load this into H2O? Using a sparse matrix representation it is only 500MB or so.
How can I load a sparse matrix into H2O?