Blunde1 / agtboost

Adaptive and automatic gradient boosting computations.
MIT License
66 stars 11 forks source link

Efficient serialization of agtboost model objects #59

Open Blunde1 opened 2 years ago

Blunde1 commented 2 years ago

Resolves #57

Blunde1 commented 2 years ago

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