[Breaking] Don't drop trees during DART prediction by default (#5115)
* Simplify DropTrees calling logic * Add `training` parameter for prediction method. * [Breaking]: Add `training` to C API. * Change for R and Python custom objective. * Correct comment. Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu> Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
@@ -556,7 +556,8 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGBoosterPredict
|
||||
DMatrixHandle dmat = (DMatrixHandle) jdmat;
|
||||
bst_ulong len;
|
||||
float *result;
|
||||
int ret = XGBoosterPredict(handle, dmat, joption_mask, (unsigned int) jntree_limit, &len, (const float **) &result);
|
||||
int ret = XGBoosterPredict(handle, dmat, joption_mask, (unsigned int) jntree_limit, 0,
|
||||
&len, (const float **) &result);
|
||||
if (len) {
|
||||
jsize jlen = (jsize) len;
|
||||
jfloatArray jarray = jenv->NewFloatArray(jlen);
|
||||
|
||||
Reference in New Issue
Block a user