MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / LGBM_BoosterPredictForMat_R

Function LGBM_BoosterPredictForMat_R

src/lightgbm_R.cpp:565–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565LGBM_SE LGBM_BoosterPredictForMat_R(LGBM_SE handle,
566 LGBM_SE data,
567 LGBM_SE num_row,
568 LGBM_SE num_col,
569 LGBM_SE is_rawscore,
570 LGBM_SE is_leafidx,
571 LGBM_SE is_predcontrib,
572 LGBM_SE num_iteration,
573 LGBM_SE parameter,
574 LGBM_SE out_result,
575 LGBM_SE call_state) {
576 R_API_BEGIN();
577 int pred_type = GetPredictType(is_rawscore, is_leafidx, is_predcontrib);
578
579 int32_t nrow = R_AS_INT(num_row);
580 int32_t ncol = R_AS_INT(num_col);
581
582 double* p_mat = R_REAL_PTR(data);
583 double* ptr_ret = R_REAL_PTR(out_result);
584 int64_t out_len;
585 CHECK_CALL(LGBM_BoosterPredictForMat(R_GET_PTR(handle),
586 p_mat, C_API_DTYPE_FLOAT64, nrow, ncol, COL_MAJOR,
587 pred_type, R_AS_INT(num_iteration), R_CHAR_PTR(parameter), &out_len, ptr_ret));
588
589 R_API_END();
590}
591
592LGBM_SE LGBM_BoosterSaveModel_R(LGBM_SE handle,
593 LGBM_SE num_iteration,

Callers

nothing calls this directly

Calls 3

GetPredictTypeFunction · 0.70
R_GET_PTRFunction · 0.50

Tested by

no test coverage detected