Voting based data parallel learning algorithm. Like data parallel, but not aggregate histograms for all features. Here using voting to reduce features, and only aggregate histograms for selected features. When data is large and #feature is large, you can use this to have better speed-up.
More...
#include <parallel_tree_learner.h>
|
| VotingParallelTreeLearner (const Config *config) |
|
void | Init (const Dataset *train_data, bool is_constant_hessian) override |
|
void | ResetConfig (const Config *config) override |
|
|
void | BeforeTrain () override |
|
bool | BeforeFindBestSplit (const Tree *tree, int left_leaf, int right_leaf) override |
|
void | FindBestSplits () override |
|
void | FindBestSplitsFromHistograms (const std::vector< int8_t > &is_feature_used, bool use_subtract) override |
|
void | Split (Tree *tree, int best_Leaf, int *left_leaf, int *right_leaf) override |
|
data_size_t | GetGlobalDataCountInLeaf (int leaf_idx) const override |
|
void | GlobalVoting (int leaf_idx, const std::vector< LightSplitInfo > &splits, std::vector< int > *out) |
| Perform global voting.
|
|
void | CopyLocalHistogram (const std::vector< int > &smaller_top_features, const std::vector< int > &larger_top_features) |
| Copy local histgram to buffer.
|
|
template<typename TREELEARNER_T>
class LightGBM::VotingParallelTreeLearner< TREELEARNER_T >
Voting based data parallel learning algorithm. Like data parallel, but not aggregate histograms for all features. Here using voting to reduce features, and only aggregate histograms for selected features. When data is large and #feature is large, you can use this to have better speed-up.
◆ CopyLocalHistogram()
template<typename TREELEARNER_T >
void LightGBM::VotingParallelTreeLearner< TREELEARNER_T >::CopyLocalHistogram |
( |
const std::vector< int > & |
smaller_top_features, |
|
|
const std::vector< int > & |
larger_top_features |
|
) |
| |
|
protected |
Copy local histgram to buffer.
- Parameters
-
smaller_top_features | Selected features for smaller leaf |
larger_top_features | Selected features for larger leaf |
◆ GlobalVoting()
template<typename TREELEARNER_T >
Perform global voting.
- Parameters
-
leaf_idx | index of leaf |
splits | All splits from local voting |
out | Result of gobal voting, only store feature indices |
The documentation for this class was generated from the following files:
- External/LightGBM_2.2.3/LightGBM-2.2.3/src/treelearner/parallel_tree_learner.h
- External/LightGBM_2.2.3/LightGBM-2.2.3/src/treelearner/voting_parallel_tree_learner.cpp