Skip to content

Commit

Permalink
fix a bug of filter count.
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke authored Apr 9, 2017
1 parent 5b355b0 commit db3d1f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/dataset_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void DatasetLoader::ConstructBinMappersFromTextData(int rank, int num_machines,
dataset->feature_names_ = feature_names_;
std::vector<std::unique_ptr<BinMapper>> bin_mappers(sample_values.size());
const data_size_t filter_cnt = static_cast<data_size_t>(
static_cast<double>(io_config_.min_data_in_leaf* sample_values.size()) / dataset->num_data_);
static_cast<double>(io_config_.min_data_in_leaf* sample_data.size()) / dataset->num_data_);

// start find bins
if (num_machines == 1) {
Expand Down Expand Up @@ -1031,4 +1031,4 @@ std::string DatasetLoader::CheckCanLoadFromBin(const char* filename) {

}

}
}

0 comments on commit db3d1f8

Please sign in to comment.