Closed bakaburg1 closed 3 years ago
UPDATE: If I build the list manually the error doesn't occur.
model <- lapply(1:n_models, function(i) {
bartMachine(X = X, y = y, serialize = TRUE, verbose = F, ...)
})
it's just a bit annoying since it prints serializing in order to be saved for future R sessions...done
at every iteration (and I think is a bit slower).
Thanks for the report. The bartMachineArr
function is really just the wrapper you wrote in your UPDATE and it uses the bart_machine_duplicate
method internally which sets serialize = FALSE
. It was never intended to be saved due to size. So if you need this feature, you can use your code.
Hello,
I'm generating an ensemble model with
bartMachineArr()
to produce a more robust posterior predictive distribution. I need to save the model for later use. When I restore the array though, only the first model will work withbart_machine_get_posterior()
, while for the others I get:I guess the
serialize
argument ofbartMachine
doesn't get passed to the other models, or some connection is lost.Here's the dummy code to produce the model:
And to produce averaged predictive posteriors:
My session info: