Check against R seed. (#5125)

* Handle it in R instead.
This commit is contained in:
Jiaming Yuan 2019-12-17 19:14:59 +08:00 committed by GitHub
parent 2fdb34ed2e
commit 63ffd2f686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -293,6 +293,9 @@ xgb.train <- function(params = list(), data, nrounds, watchlist = list(),
}
# Sort the callbacks into categories
cb <- categorize.callbacks(callbacks)
if (!is.null(params[['seed']])) {
warning("xgb.train: `seed` is ignored in R package. Use `set.seed()` instead.")
}
# The tree updating process would need slightly different handling
is_update <- NVL(params[['process_type']], '.') == 'update'

View File

@ -349,7 +349,7 @@ Specify the learning task and the corresponding learning objective. The objectiv
* ``seed`` [default=0]
- Random number seed.
- Random number seed. This parameter is ignored in R package, use `set.seed()` instead.
***********************
Command Line Parameters