* Add bindings for serialization. * Change `xgb.save.raw' into full serialization instead of simple model. * Add `xgb.load.raw' for unserialization. * Run devtools.
13 lines
395 B
R
13 lines
395 B
R
#' Load the instance back from \code{\link{xgb.serialize}}
|
|
#'
|
|
#' @param buffer the buffer containing booster instance saved by \code{\link{xgb.serialize}}
|
|
#'
|
|
#' @export
|
|
xgb.unserialize <- function(buffer) {
|
|
cachelist <- list()
|
|
handle <- .Call(XGBoosterCreate_R, cachelist)
|
|
.Call(XGBoosterUnserializeFromBuffer_R, handle, buffer)
|
|
class(handle) <- "xgb.Booster.handle"
|
|
return (handle)
|
|
}
|