Expose model parameters to R
This commit is contained in:
parent
5473994a42
commit
91429bd63d
@ -140,6 +140,7 @@ xgb.train <- function(params=list(), data, nrounds, watchlist = list(),
|
||||
warning('watchlist is provided but verbose=0, no evaluation information will be printed')
|
||||
}
|
||||
|
||||
fit.call <- match.call()
|
||||
dot.params <- list(...)
|
||||
nms.params <- names(params)
|
||||
nms.dot.params <- names(dot.params)
|
||||
@ -224,9 +225,13 @@ xgb.train <- function(params=list(), data, nrounds, watchlist = list(),
|
||||
}
|
||||
}
|
||||
bst <- xgb.Booster.check(bst)
|
||||
|
||||
if (!is.null(early.stop.round)) {
|
||||
bst$bestScore <- bestScore
|
||||
bst$bestInd <- bestInd
|
||||
}
|
||||
|
||||
attr(bst, "call") <- fit.call
|
||||
attr(bst, "params") <- params
|
||||
return(bst)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user