fix some wording
This commit is contained in:
parent
b8711226e2
commit
611d69c771
@ -222,10 +222,10 @@ xgb.cv.mknfold <- function(dall, nfold, param, stratified) {
|
|||||||
y <- getinfo(dall, 'label')
|
y <- getinfo(dall, 'label')
|
||||||
if (stratified & length(y) == length(randidx)) {
|
if (stratified & length(y) == length(randidx)) {
|
||||||
y <- y[randidx]
|
y <- y[randidx]
|
||||||
# by default assume that y is a classification label, and only
|
# By default assume that y is a classification label,
|
||||||
# leave it numeric for the reg:linear objective
|
# and only leave it numeric for the reg:linear objective.
|
||||||
# WARNING: if there would be any objectives with truly numerical
|
# WARNING: if there would be any other objectives with truly
|
||||||
# they would not currently be treated correctly.
|
# numerical labels, they currently would not be treated correctly!
|
||||||
if (param[['objective']] != 'reg:linear') y <- factor(y)
|
if (param[['objective']] != 'reg:linear') y <- factor(y)
|
||||||
idset <- xgb.createFolds(y, nfold)
|
idset <- xgb.createFolds(y, nfold)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user