@@ -140,7 +140,7 @@ check.custom.eval <- function(env = parent.frame()) {
140
140
141
141
142
142
# Update a booster handle for an iteration with dtrain data
143
- xgb.iter.update <- function (booster_handle , dtrain , iter , obj = NULL ) {
143
+ xgb.iter.update <- function (booster_handle , dtrain , iter , obj ) {
144
144
if (! identical(class(booster_handle ), " xgb.Booster.handle" )) {
145
145
stop(" booster_handle must be of xgb.Booster.handle class" )
146
146
}
@@ -163,7 +163,7 @@ xgb.iter.update <- function(booster_handle, dtrain, iter, obj = NULL) {
163
163
# Evaluate one iteration.
164
164
# Returns a named vector of evaluation metrics
165
165
# with the names in a 'datasetname-metricname' format.
166
- xgb.iter.eval <- function (booster_handle , watchlist , iter , feval = NULL ) {
166
+ xgb.iter.eval <- function (booster_handle , watchlist , iter , feval ) {
167
167
if (! identical(class(booster_handle ), " xgb.Booster.handle" ))
168
168
stop(" class of booster_handle must be xgb.Booster.handle" )
169
169
@@ -234,7 +234,7 @@ generate.cv.folds <- function(nfold, nrows, stratified, label, params) {
234
234
y <- factor (y )
235
235
}
236
236
}
237
- folds <- xgb.createFolds(y , nfold )
237
+ folds <- xgb.createFolds(y = y , k = nfold )
238
238
} else {
239
239
# make simple non-stratified folds
240
240
kstep <- length(rnd_idx ) %/% nfold
@@ -251,7 +251,7 @@ generate.cv.folds <- function(nfold, nrows, stratified, label, params) {
251
251
# Creates CV folds stratified by the values of y.
252
252
# It was borrowed from caret::createFolds and simplified
253
253
# by always returning an unnamed list of fold indices.
254
- xgb.createFolds <- function (y , k = 10 ) {
254
+ xgb.createFolds <- function (y , k ) {
255
255
if (is.numeric(y )) {
256
256
# # Group the numeric data based on their magnitudes
257
257
# # and sample within those groups.
0 commit comments