fix some wording

This commit is contained in:
Vadim Khotilovich 2015-04-02 19:59:06 -05:00
parent b8711226e2
commit 611d69c771

View File

@ -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 {