fix multi cv pred
This commit is contained in:
parent
37567e440c
commit
431277d5ca
@ -121,7 +121,8 @@ xgb.cv <- function(params=list(), data, nrounds, nfold, label = NULL, missing =
|
|||||||
} else {
|
} else {
|
||||||
res <- xgb.iter.eval(fd$booster, fd$watchlist, i - 1, feval, prediction)
|
res <- xgb.iter.eval(fd$booster, fd$watchlist, i - 1, feval, prediction)
|
||||||
if (mat_pred) {
|
if (mat_pred) {
|
||||||
predictValues[fd$index,] <- res[[2]]
|
pred_mat = matrix(res[[2]],num_class,length(fd$index))
|
||||||
|
predictValues[fd$index,] <- t(pred_mat)
|
||||||
} else {
|
} else {
|
||||||
predictValues[fd$index] <- res[[2]]
|
predictValues[fd$index] <- res[[2]]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user