stephematician/literanger

Serialisation of forests

Closed this issue · 3 comments

Need to be able to read and write the forests to file. Should also implement an R interface.

Questions I have are

  1. What pattern to use (starting with the 'conventions' mentioned https://isocpp.org/wiki/faq/serialization#serialize-overview)
  2. Some values are held as shared resources, would prefer to avoid duplication - i.e. if a value (resource) is shared across 500 trees in the forest, we don't want to read/write 500 duplicates.

Boost might be an option: https://www.boost.org/doc/libs/1_82_0/libs/serialization/doc/index.html

For my own sanity - this looks like a better (header only) option than Boost, cereal: https://github.com/USCiLab/cereal. It could be imported using the same pattern as Eigen - just need to take care of license note.

CRAN did not approve of the means for importing Eigen - therefore I think the whole cereal library would need to be included in the repository instead.

Done in v0.1.0. Project moved to gitlab.