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

Function LGBM_DatasetCreateFromSampledColumn

src/c_api.cpp:504–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502
503
504int LGBM_DatasetCreateFromSampledColumn(double** sample_data,
505 int** sample_indices,
506 int32_t ncol,
507 const int* num_per_col,
508 int32_t num_sample_row,
509 int32_t num_total_row,
510 const char* parameters,
511 DatasetHandle* out) {
512 API_BEGIN();
513 auto param = Config::Str2Map(parameters);
514 Config config;
515 config.Set(param);
516 if (config.num_threads > 0) {
517 omp_set_num_threads(config.num_threads);
518 }
519 DatasetLoader loader(config, nullptr, 1, nullptr);
520 *out = loader.CostructFromSampleData(sample_data, sample_indices, ncol, num_per_col,
521 num_sample_row,
522 static_cast<data_size_t>(num_total_row));
523 API_END();
524}
525
526
527int LGBM_DatasetCreateByReference(const DatasetHandle reference,

Callers

nothing calls this directly

Calls 3

omp_set_num_threadsFunction · 0.50
SetMethod · 0.45

Tested by

no test coverage detected