[R] remove commented-out code (#9481)
This commit is contained in:
parent
8463107013
commit
b82e78c169
@ -135,9 +135,6 @@ xgb.cv <- function(params = list(), data, nrounds, nfold, label = NULL, missing
|
|||||||
check.custom.obj()
|
check.custom.obj()
|
||||||
check.custom.eval()
|
check.custom.eval()
|
||||||
|
|
||||||
#if (is.null(params[['eval_metric']]) && is.null(feval))
|
|
||||||
# stop("Either 'eval_metric' or 'feval' must be provided for CV")
|
|
||||||
|
|
||||||
# Check the labels
|
# Check the labels
|
||||||
if ((inherits(data, 'xgb.DMatrix') && is.null(getinfo(data, 'label'))) ||
|
if ((inherits(data, 'xgb.DMatrix') && is.null(getinfo(data, 'label'))) ||
|
||||||
(!inherits(data, 'xgb.DMatrix') && is.null(label))) {
|
(!inherits(data, 'xgb.DMatrix') && is.null(label))) {
|
||||||
@ -161,10 +158,6 @@ xgb.cv <- function(params = list(), data, nrounds, nfold, label = NULL, missing
|
|||||||
folds <- generate.cv.folds(nfold, nrow(data), stratified, cv_label, params)
|
folds <- generate.cv.folds(nfold, nrow(data), stratified, cv_label, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Potential TODO: sequential CV
|
|
||||||
#if (strategy == 'sequential')
|
|
||||||
# stop('Sequential CV strategy is not yet implemented')
|
|
||||||
|
|
||||||
# verbosity & evaluation printing callback:
|
# verbosity & evaluation printing callback:
|
||||||
params <- c(params, list(silent = 1))
|
params <- c(params, list(silent = 1))
|
||||||
print_every_n <- max(as.integer(print_every_n), 1L)
|
print_every_n <- max(as.integer(print_every_n), 1L)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user