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

Function LGBM_BoosterPredictForMat

src/c_api.cpp:1471–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1469}
1470
1471int LGBM_BoosterPredictForMat(BoosterHandle handle,
1472 const void* data,
1473 int data_type,
1474 int32_t nrow,
1475 int32_t ncol,
1476 int is_row_major,
1477 int predict_type,
1478 int num_iteration,
1479 const char* parameter,
1480 int64_t* out_len,
1481 double* out_result) {
1482 API_BEGIN();
1483 auto param = Config::Str2Map(parameter);
1484 Config config;
1485 config.Set(param);
1486 if (config.num_threads > 0) {
1487 omp_set_num_threads(config.num_threads);
1488 }
1489 Booster* ref_booster = reinterpret_cast<Booster*>(handle);
1490 auto get_row_fun = RowPairFunctionFromDenseMatric(data, nrow, ncol, data_type, is_row_major);
1491 ref_booster->Predict(num_iteration, predict_type, nrow, ncol, get_row_fun,
1492 config, out_result, out_len);
1493 API_END();
1494}
1495
1496int LGBM_BoosterPredictForMatSingleRow(BoosterHandle handle,
1497 const void* data,

Callers 1

Calls 4

omp_set_num_threadsFunction · 0.50
SetMethod · 0.45
PredictMethod · 0.45

Tested by

no test coverage detected