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:
Bryan Woods
2019-05-23 19:45:02 +02:00
committed by Philip Hyunsu Cho
parent 5a567ec249
commit 278562db13
9 changed files with 223 additions and 18 deletions

View File

@@ -221,6 +221,20 @@ XGB_DLL int XGDMatrixSliceDMatrix(DMatrixHandle handle,
const int *idxset,
bst_ulong len,
DMatrixHandle *out);
/*!
* \brief create a new dmatrix from sliced content of existing matrix
* \param handle instance of data matrix to be sliced
* \param idxset index set
* \param len length of index set
* \param out a sliced new matrix
* \param allow_groups allow slicing of an array with groups
* \return 0 when success, -1 when failure happens
*/
XGB_DLL int XGDMatrixSliceDMatrixEx(DMatrixHandle handle,
const int *idxset,
bst_ulong len,
DMatrixHandle *out,
int allow_groups);
/*!
* \brief free space in data matrix
* \return 0 when success, -1 when failure happens