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

Function LGBM_BoosterPredictForMatSingleRow

src/c_api.cpp:1496–1517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494}
1495
1496int LGBM_BoosterPredictForMatSingleRow(BoosterHandle handle,
1497 const void* data,
1498 int data_type,
1499 int32_t ncol,
1500 int is_row_major,
1501 int predict_type,
1502 int num_iteration,
1503 const char* parameter,
1504 int64_t* out_len,
1505 double* out_result) {
1506 API_BEGIN();
1507 auto param = Config::Str2Map(parameter);
1508 Config config;
1509 config.Set(param);
1510 if (config.num_threads > 0) {
1511 omp_set_num_threads(config.num_threads);
1512 }
1513 Booster* ref_booster = reinterpret_cast<Booster*>(handle);
1514 auto get_row_fun = RowPairFunctionFromDenseMatric(data, 1, ncol, data_type, is_row_major);
1515 ref_booster->PredictSingleRow(num_iteration, predict_type, ncol, get_row_fun, config, out_result, out_len);
1516 API_END();
1517}
1518
1519
1520int LGBM_BoosterPredictForMats(BoosterHandle handle,

Callers

nothing calls this directly

Calls 4

omp_set_num_threadsFunction · 0.50
SetMethod · 0.45
PredictSingleRowMethod · 0.45

Tested by

no test coverage detected