Commit 159668d6 authored by Guolin Ke's avatar Guolin Ke
Browse files

fix #1089 : voting parallel bug for sparse data

parent 63b60825
...@@ -169,7 +169,7 @@ void VotingParallelTreeLearner<TREELEARNER_T>::GlobalVoting(int leaf_idx, const ...@@ -169,7 +169,7 @@ void VotingParallelTreeLearner<TREELEARNER_T>::GlobalVoting(int leaf_idx, const
} }
// get mean number on machines // get mean number on machines
score_t mean_num_data = GetGlobalDataCountInLeaf(leaf_idx) / static_cast<score_t>(num_machines_); score_t mean_num_data = GetGlobalDataCountInLeaf(leaf_idx) / static_cast<score_t>(num_machines_);
std::vector<LightSplitInfo> feature_best_split(this->num_features_, LightSplitInfo()); std::vector<LightSplitInfo> feature_best_split(this->train_data_->num_total_features() , LightSplitInfo());
for (auto & split : splits) { for (auto & split : splits) {
int fid = split.feature; int fid = split.feature;
if (fid < 0) { if (fid < 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment