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

Function LGBM_BoosterPredictForMats

src/c_api.cpp:1520–1541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1518
1519
1520int LGBM_BoosterPredictForMats(BoosterHandle handle,
1521 const void** data,
1522 int data_type,
1523 int32_t nrow,
1524 int32_t ncol,
1525 int predict_type,
1526 int num_iteration,
1527 const char* parameter,
1528 int64_t* out_len,
1529 double* out_result) {
1530 API_BEGIN();
1531 auto param = Config::Str2Map(parameter);
1532 Config config;
1533 config.Set(param);
1534 if (config.num_threads > 0) {
1535 omp_set_num_threads(config.num_threads);
1536 }
1537 Booster* ref_booster = reinterpret_cast<Booster*>(handle);
1538 auto get_row_fun = RowPairFunctionFromDenseRows(data, ncol, data_type);
1539 ref_booster->Predict(num_iteration, predict_type, nrow, ncol, get_row_fun, config, out_result, out_len);
1540 API_END();
1541}
1542
1543int LGBM_BoosterSaveModel(BoosterHandle handle,
1544 int start_iteration,

Callers

nothing calls this directly

Calls 4

omp_set_num_threadsFunction · 0.50
SetMethod · 0.45
PredictMethod · 0.45

Tested by

no test coverage detected