forestry-labs / Rforestry

https://forestry-labs.github.io/Rforestry/
34 stars 9 forks source link

Export model to JSON string #114

Closed edwardwliu closed 1 year ago

edwardwliu commented 1 year ago

Support exporting trained models to JSON. The preferred spec should be compatible with Treelite, see documentation. Since serialization can be relatively slow as well as need to be supported in R and Python, I would consider exposing a C++ method for the JSON export. Otherwise, if we change any underlying model representations, we would need to update the wrappers separately. cc @theo-s.