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

Method CopySubset

src/io/dataset.cpp:527–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527void Dataset::CopySubset(const Dataset* fullset, const data_size_t* used_indices, data_size_t num_used_indices, bool need_meta_data) {
528 CHECK(num_used_indices == num_data_);
529 OMP_INIT_EX();
530 #pragma omp parallel for schedule(static)
531 for (int group = 0; group < num_groups_; ++group) {
532 OMP_LOOP_EX_BEGIN();
533 feature_groups_[group]->CopySubset(fullset->feature_groups_[group].get(), used_indices, num_used_indices);
534 OMP_LOOP_EX_END();
535 }
536 OMP_THROW_EX();
537 if (need_meta_data) {
538 metadata_.Init(fullset->metadata_, used_indices, num_used_indices);
539 }
540 is_finish_load_ = true;
541}
542
543bool Dataset::SetFloatField(const char* field_name, const float* field_data, data_size_t num_element) {
544 std::string name(field_name);

Callers 3

LGBM_DatasetGetSubsetFunction · 0.45
BaggingMethod · 0.45
BaggingMethod · 0.45

Calls 2

getMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected