When using bartMachine, if I create the bart model on one machine with serialize = TRUE
bart <- bartMachine(X, Y,
k = 2,
num_trees = 50,
use_missing_data = TRUE,
serialize = TRUE,
verbose = FALSE)
and save it (save(bart, file = 'bart.bartmachine')
), I cannot open it on a different machine (load(file = 'bart.bartmachine')
), receiving the error:
Error in check_serialization(bart_machine) :
This bartMachine object was loaded from an R image but was not serialized.
Please build bartMachine using the option "serialize = TRUE" next time.
This is consistent in both directions:
- Create and Save on Machine 1 -> load on Machine 2
- Create and Save on Machine 2 -> load on Machine 1
I have the seed set and cores set to 1:
set.seed(123)
set_bart_machine_num_cores(1)
Any thoughts on how to make this compatible? I could work around by saving machine specific versions but trying to avoid this.