Ejemplo n.º 1
0
 DLLEXPORT void XGBoosterUpdateInteract( void *handle, void *dtrain, const char *action ){
     Booster *bst = static_cast<Booster*>(handle);
     DMatrix *dtr = static_cast<DMatrix*>(dtrain); 
     bst->CheckInit(); dtr->CheckInit(); 
     std::string act( action );
     bst->UpdateInteract( act, *dtr );
 }
Ejemplo n.º 2
0
 DLLEXPORT void XGBoosterBoostOneIter( void *handle, void *dtrain, 
                             float *grad, float *hess, size_t len, int bst_group ){
     Booster *bst = static_cast<Booster*>(handle);
     DMatrix *dtr = static_cast<DMatrix*>(dtrain);
     bst->CheckInit(); dtr->CheckInit(); 
     bst->BoostOneIter( *dtr, grad, hess, len, bst_group );
 }      
Ejemplo n.º 3
0
 void XGBoosterUpdateOneIter(void *handle, int iter, void *dtrain) {
   Booster *bst = static_cast<Booster*>(handle);
   DataMatrix *dtr = static_cast<DataMatrix*>(dtrain);
   bst->CheckInitModel();
   bst->CheckInit(dtr);
   bst->UpdateOneIter(iter, *dtr);
 }
Ejemplo n.º 4
0
 void XGBoosterBoostOneIter(void *handle, void *dtrain,
                            float *grad, float *hess, bst_ulong len) {
   Booster *bst = static_cast<Booster*>(handle);
   DataMatrix *dtr = static_cast<DataMatrix*>(dtrain);
   bst->CheckInitModel();
   bst->CheckInit(dtr);
   bst->BoostOneIter(*dtr, grad, hess, len);
 }
Ejemplo n.º 5
0
int XGBoosterUpdateOneIter(BoosterHandle handle,
                           int iter,
                           DMatrixHandle dtrain) {
  API_BEGIN();
  Booster *bst = static_cast<Booster*>(handle);
  DataMatrix *dtr = static_cast<DataMatrix*>(dtrain);
  bst->CheckInitModel();
  bst->CheckInit(dtr);
  bst->UpdateOneIter(iter, *dtr);
  API_END();
}
Ejemplo n.º 6
0
    DLLEXPORT void XGBoosterEvalOneIter( void *handle, int iter, void *dmats[], const char *evnames[], size_t len ){
        Booster *bst = static_cast<Booster*>(handle);
        bst->CheckInit();

        std::vector<std::string> names;
        std::vector<const xgboost::regrank::DMatrix*> mats;
        for( size_t i = 0; i < len; ++i ){
            mats.push_back( static_cast<DMatrix*>(dmats[i]) );
            names.push_back( std::string( evnames[i]) );
        }
        bst->EvalOneIter( iter, mats, names, stderr );
    }
Ejemplo n.º 7
0
int XGBoosterBoostOneIter(BoosterHandle handle,
                          DMatrixHandle dtrain,
                          float *grad,
                          float *hess,
                          bst_ulong len) {
  API_BEGIN();
  Booster *bst = static_cast<Booster*>(handle);
  DataMatrix *dtr = static_cast<DataMatrix*>(dtrain);
  bst->CheckInitModel();
  bst->CheckInit(dtr);
  bst->BoostOneIter(*dtr, grad, hess, len);
  API_END();
}
Ejemplo n.º 8
0
 DLLEXPORT void XGBoosterUpdateOneIter( void *handle, void *dtrain ){
     Booster *bst = static_cast<Booster*>(handle);
     DMatrix *dtr = static_cast<DMatrix*>(dtrain);
     bst->CheckInit(); dtr->CheckInit();
     bst->UpdateOneIter( *dtr );
 }