Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
LightGBM::VotingParallelTreeLearner< TREELEARNER_T > Class Template Reference

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>

Inheritance diagram for LightGBM::VotingParallelTreeLearner< TREELEARNER_T >:

Public Member Functions

 VotingParallelTreeLearner (const Config *config)
 
void Init (const Dataset *train_data, bool is_constant_hessian) override
 
void ResetConfig (const Config *config) override
 

Protected Member Functions

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.
 

Detailed Description

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.

Member Function Documentation

◆ 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_featuresSelected features for smaller leaf
larger_top_featuresSelected features for larger leaf

◆ GlobalVoting()

template<typename TREELEARNER_T >
void LightGBM::VotingParallelTreeLearner< TREELEARNER_T >::GlobalVoting ( int  leaf_idx,
const std::vector< LightSplitInfo > &  splits,
std::vector< int > *  out 
)
protected

Perform global voting.

Parameters
leaf_idxindex of leaf
splitsAll splits from local voting
outResult of gobal voting, only store feature indices

The documentation for this class was generated from the following files: