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

Function LGBM_BoosterCalcNumPredict_R

src/lightgbm_R.cpp:515–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515LGBM_SE LGBM_BoosterCalcNumPredict_R(LGBM_SE handle,
516 LGBM_SE num_row,
517 LGBM_SE is_rawscore,
518 LGBM_SE is_leafidx,
519 LGBM_SE is_predcontrib,
520 LGBM_SE num_iteration,
521 LGBM_SE out_len,
522 LGBM_SE call_state) {
523 R_API_BEGIN();
524 int pred_type = GetPredictType(is_rawscore, is_leafidx, is_predcontrib);
525 int64_t len = 0;
526 CHECK_CALL(LGBM_BoosterCalcNumPredict(R_GET_PTR(handle), R_AS_INT(num_row),
527 pred_type, R_AS_INT(num_iteration), &len));
528 R_INT_PTR(out_len)[0] = static_cast<int>(len);
529 R_API_END();
530}
531
532LGBM_SE LGBM_BoosterPredictForCSC_R(LGBM_SE handle,
533 LGBM_SE indptr,

Callers

nothing calls this directly

Calls 3

GetPredictTypeFunction · 0.70
R_GET_PTRFunction · 0.50

Tested by

no test coverage detected