Skip to content

Commit

Permalink
fix #1089 : voting parallel bug for sparse data
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Dec 1, 2017
1 parent 63b6082 commit 159668d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/treelearner/voting_parallel_tree_learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void VotingParallelTreeLearner<TREELEARNER_T>::GlobalVoting(int leaf_idx, const
}
// get mean number on 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) {
int fid = split.feature;
if (fid < 0) {
Expand Down

0 comments on commit 159668d

Please sign in to comment.