From db3d1f89cae48833e4da361b0b403bb85ba1cfea Mon Sep 17 00:00:00 2001 From: Guolin Ke Date: Sun, 9 Apr 2017 15:15:42 +0800 Subject: [PATCH] fix a bug of filter count. --- src/io/dataset_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/dataset_loader.cpp b/src/io/dataset_loader.cpp index 22fa1a5a904c..f74a234e5fe0 100644 --- a/src/io/dataset_loader.cpp +++ b/src/io/dataset_loader.cpp @@ -707,7 +707,7 @@ void DatasetLoader::ConstructBinMappersFromTextData(int rank, int num_machines, dataset->feature_names_ = feature_names_; std::vector> bin_mappers(sample_values.size()); const data_size_t filter_cnt = static_cast( - static_cast(io_config_.min_data_in_leaf* sample_values.size()) / dataset->num_data_); + static_cast(io_config_.min_data_in_leaf* sample_data.size()) / dataset->num_data_); // start find bins if (num_machines == 1) { @@ -1031,4 +1031,4 @@ std::string DatasetLoader::CheckCanLoadFromBin(const char* filename) { } -} \ No newline at end of file +}