add handle and raw structure to xgb.Booster
This commit is contained in:
@@ -19,5 +19,9 @@
|
||||
xgb.load <- function(modelfile) {
|
||||
if (is.null(modelfile))
|
||||
stop("xgb.load: modelfile cannot be NULL")
|
||||
xgb.Booster(modelfile = modelfile)
|
||||
bst <- list(handle = NULL,raw = NULL)
|
||||
class(bst) <- 'xgb.Booster'
|
||||
bst$handle <- xgb.Booster(modelfile = modelfile)
|
||||
bst$raw <- xgb.save.raw(bst$handle)
|
||||
return(bst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user