suiji / Arborist

Scalable decision tree training and inference.
Other
82 stars 14 forks source link

serialization #26

Closed isaacyho closed 7 years ago

isaacyho commented 7 years ago

Is there a way to serialize/deserialize a trained forest using only the C++ core? I don't see such an option, would be supremely helpful...I see some folks have used saveRDS in R

suiji commented 7 years ago

Two interpretations of "C++ core" come to mind: i) The raw STL vectors built by the API. ii) The Rcpp-templated (R-style) vectors wrapped by the glue code.

Neither form has its own de/serialization methods, but:

Form (ii) would probably be easier to implement. However, once everything has been wrapped in R-like containers, there probably is not that much additional overhead in using read/saveRDS(). These calls might, in fact, be bypassed by calling their counterparts from within Rcpp (glue) code.

Form(i) is probably more useful, though, as it pretty much forces standardization of the API.

Are either of these forms what you have in mind? Would you care to discuss your appication?

suiji commented 7 years ago

In the absence of a response to the request for clarification, this issue is being closed. Feel free to reopen it, however, if further discussion becomes warranted. Perhaps R's existing de/serialization methods were sufficient for the poster's needs.