vdorie / stan4bart

Uses Stan sampler and math library to semiparametrically fit linear and multilevel models with additive Bayesian Additive Regression Tree (BART) components.
40 stars 4 forks source link

Saving Model to a *.RData object #11

Open Pentaonia opened 1 year ago

Pentaonia commented 1 year ago

Hi,

how do I save the model to an *.RData object so that I can perform a prediction after reloading? In the dbarts package you have to touch the pointer via invisible(model$fit$state) to store it as an internal R object. Is there something similar to your package? sampler.bart and range.bart are used for prediction as mentioned but invisible(model$sampler.bart) does not bring the desired success.

Best and thanks again Louis

vdorie commented 1 year ago

It hasn't been implemented yet, as I would have to write something to serialize the C++ internal state to R objects.