add cutomized training
This commit is contained in:
@@ -127,6 +127,19 @@ extern "C"{
|
||||
* \param dtrain training data
|
||||
*/
|
||||
void XGBoosterUpdateOneIter( void *handle, void *dtrain );
|
||||
|
||||
/*!
|
||||
* \brief update the model, by directly specify gradient and second order gradient,
|
||||
* this can be used to replace UpdateOneIter, to support customized loss function
|
||||
* \param handle handle
|
||||
* \param dtrain training data
|
||||
* \param grad gradient statistics
|
||||
* \param hess second order gradient statistics
|
||||
* \param len length of grad/hess array
|
||||
* \param bst_group boost group we are working at, default = -1
|
||||
*/
|
||||
void XGBoosterBoostOneIter( void *handle, void *dtrain,
|
||||
float *grad, float *hess, size_t len, int bst_group );
|
||||
/*!
|
||||
* \brief print evaluation statistics to stdout for xgboost
|
||||
* \param handle handle
|
||||
@@ -141,8 +154,9 @@ extern "C"{
|
||||
* \param handle handle
|
||||
* \param dmat data matrix
|
||||
* \param len used to store length of returning result
|
||||
* \param bst_group booster group, if model contains multiple booster group, default = -1 means predict for all groups
|
||||
*/
|
||||
const float *XGBoosterPredict( void *handle, void *dmat, size_t *len );
|
||||
const float *XGBoosterPredict( void *handle, void *dmat, size_t *len, int bst_group );
|
||||
/*!
|
||||
* \brief load model from existing file
|
||||
* \param handle handle
|
||||
|
||||
Reference in New Issue
Block a user