Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
LightGBM::GPUTreeLearner Class Reference
Inheritance diagram for LightGBM::GPUTreeLearner:
LightGBM::SerialTreeLearner LightGBM::TreeLearner

Public Member Functions

 GPUTreeLearner (const Config *tree_config)
 
- Public Member Functions inherited from LightGBM::SerialTreeLearner
 SerialTreeLearner (const Config *config)
 
void Init (const Dataset *train_data, bool is_constant_hessian) override
 Initialize tree learner with training dataset.
 
void ResetTrainingData (const Dataset *train_data) override
 
void ResetConfig (const Config *config) override
 Reset tree configs.
 
TreeTrain (const score_t *gradients, const score_t *hessians, bool is_constant_hessian, Json &forced_split_json) override
 training tree model on dataset
 
TreeFitByExistingTree (const Tree *old_tree, const score_t *gradients, const score_t *hessians) const override
 use a existing tree to fit the new gradients and hessians.
 
TreeFitByExistingTree (const Tree *old_tree, const std::vector< int > &leaf_pred, const score_t *gradients, const score_t *hessians) override
 
void SetBaggingData (const data_size_t *used_indices, data_size_t num_data) override
 Set bagging data.
 
void AddPredictionToScore (const Tree *tree, double *out_score) const override
 Using last trained tree to predict score then adding to out_score;.
 
void RenewTreeOutput (Tree *tree, const ObjectiveFunction *obj, const double *prediction, data_size_t total_num_data, const data_size_t *bag_indices, data_size_t bag_cnt) const override
 
void RenewTreeOutput (Tree *tree, const ObjectiveFunction *obj, double prediction, data_size_t total_num_data, const data_size_t *bag_indices, data_size_t bag_cnt) const override
 
- Public Member Functions inherited from LightGBM::TreeLearner
virtual ~TreeLearner ()
 virtual destructor
 
TreeLearneroperator= (const TreeLearner &)=delete
 Disable copy.
 
 TreeLearner (const TreeLearner &)=delete
 Disable copy.
 

Additional Inherited Members

- Static Public Member Functions inherited from LightGBM::TreeLearner
static TreeLearnerCreateTreeLearner (const std::string &learner_type, const std::string &device_type, const Config *config)
 Create object of tree learner.
 
- Protected Member Functions inherited from LightGBM::SerialTreeLearner
virtual void BeforeTrain ()
 Some initial works before training.
 
virtual bool BeforeFindBestSplit (const Tree *tree, int left_leaf, int right_leaf)
 Some initial works before FindBestSplit.
 
virtual void FindBestSplits ()
 
virtual void ConstructHistograms (const std::vector< int8_t > &is_feature_used, bool use_subtract)
 
virtual void FindBestSplitsFromHistograms (const std::vector< int8_t > &is_feature_used, bool use_subtract)
 
virtual void Split (Tree *tree, int best_leaf, int *left_leaf, int *right_leaf)
 Partition tree and data according best split.
 
virtual int32_t ForceSplits (Tree *tree, Json &forced_split_json, int *left_leaf, int *right_leaf, int *cur_depth, bool *aborted_last_force_split)
 
virtual data_size_t GetGlobalDataCountInLeaf (int leaf_idx) const
 Get the number of data in a leaf.
 
- Protected Attributes inherited from LightGBM::SerialTreeLearner
data_size_t num_data_
 number of data
 
int num_features_
 number of features
 
const Datasettrain_data_
 training data
 
const score_tgradients_
 gradients of current iteration
 
const score_thessians_
 hessians of current iteration
 
std::unique_ptr< DataPartitiondata_partition_
 training data partition on leaves
 
Random random_
 used for generate used features
 
std::vector< int8_t > is_feature_used_
 used for sub feature training, is_feature_used_[i] = false means don't used feature i
 
FeatureHistogramparent_leaf_histogram_array_
 pointer to histograms array of parent of current leaves
 
FeatureHistogramsmaller_leaf_histogram_array_
 pointer to histograms array of smaller leaf
 
FeatureHistogramlarger_leaf_histogram_array_
 pointer to histograms array of larger leaf
 
std::vector< SplitInfobest_split_per_leaf_
 store best split points for all leaves
 
std::unique_ptr< LeafSplitssmaller_leaf_splits_
 stores best thresholds for all feature for smaller leaf
 
std::unique_ptr< LeafSplitslarger_leaf_splits_
 stores best thresholds for all feature for larger leaf
 
std::vector< int > valid_feature_indices_
 
std::vector< score_tordered_gradients_
 gradients of current iteration, ordered for cache optimized
 
std::vector< score_tordered_hessians_
 hessians of current iteration, ordered for cache optimized
 
std::vector< std::unique_ptr< OrderedBin > > ordered_bins_
 Store ordered bin.
 
bool has_ordered_bin_ = false
 True if has ordered bin.
 
std::vector< char > is_data_in_leaf_
 is_data_in_leaf_[i] != 0 means i-th data is marked
 
HistogramPool histogram_pool_
 used to cache historical histogram to speed up
 
const Configconfig_
 config of tree learner
 
int num_threads_
 
std::vector< int > ordered_bin_indices_
 
bool is_constant_hessian_
 

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