agtboost icon indicating copy to clipboard operation
agtboost copied to clipboard

Efficient serialization of agtboost model objects

Open Blunde1 opened this issue 1 year ago • 1 comments

Resolves #57

Blunde1 avatar Aug 07 '22 15:08 Blunde1

Running

set.seed(123)
x <- runif(5000, 0, 10)
y <- rnorm(5000, x, 1)
mod <- gbt.train(y, as.matrix(x))
gbt.save(mod, 'gbt_model.rds')
mod <- gbt.load('gbt_model.rds')
mod

I obtain

> mod
Error in sprintf("C++ object <%s> of class '%s' <%s>", externalptr_address(pointer),  : 
  external pointer is not valid

Blunde1 avatar Aug 07 '22 15:08 Blunde1