Add support for cross-validation using query ID (#4474)
* adding support for matrix slicing with query ID for cross-validation * hail mary test of unrar installation for windows tests * trying to modify tests to run in Github CI * Remove dependency on wget and unrar * Save error log from R test * Relax assertion in test_training * Use int instead of bool in C function interface * Revise R interface * Add XGDMatrixSliceDMatrixEx and keep old XGDMatrixSliceDMatrix for API compatibility
This commit is contained in:
committed by
Philip Hyunsu Cho
parent
5a567ec249
commit
278562db13
@@ -279,7 +279,8 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGDMatrixSliceDMat
|
||||
jint* indexset = jenv->GetIntArrayElements(jindexset, 0);
|
||||
bst_ulong len = (bst_ulong)jenv->GetArrayLength(jindexset);
|
||||
|
||||
jint ret = (jint) XGDMatrixSliceDMatrix(handle, (int const *)indexset, len, &result);
|
||||
// default to not allowing slicing with group ID specified -- feel free to add if necessary
|
||||
jint ret = (jint) XGDMatrixSliceDMatrixEx(handle, (int const *)indexset, len, &result, 0);
|
||||
setHandle(jenv, jout, result);
|
||||
//release
|
||||
jenv->ReleaseIntArrayElements(jindexset, indexset, 0);
|
||||
|
||||
Reference in New Issue
Block a user