Fix R dart prediction. (#5204)

* Fix R dart prediction and add test.
This commit is contained in:
Jiaming Yuan
2020-01-16 12:11:04 +08:00
committed by GitHub
parent 808f61081b
commit 5199b86126
5 changed files with 80 additions and 35 deletions

View File

@@ -313,7 +313,7 @@ SEXP XGBoosterPredict_R(SEXP handle, SEXP dmat, SEXP option_mask,
R_ExternalPtrAddr(dmat),
asInteger(option_mask),
asInteger(ntree_limit),
0,
asInteger(training),
&olen, &res));
ret = PROTECT(allocVector(REALSXP, olen));
for (size_t i = 0; i < olen; ++i) {