Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
LightGBM::ScoreUpdater Class Reference

Used to store and update score for data. More...

#include <score_updater.hpp>

Public Member Functions

 ScoreUpdater (const Dataset *data, int num_tree_per_iteration)
 Constructor, will pass a const pointer of dataset.
 
 ~ScoreUpdater ()
 Destructor.
 
bool has_init_score () const
 
void AddScore (double val, int cur_tree_id)
 
void MultiplyScore (double val, int cur_tree_id)
 
void AddScore (const Tree *tree, int cur_tree_id)
 Using tree model to get prediction number, then adding to scores for all data Note: this function generally will be used on validation data too.
 
void AddScore (const TreeLearner *tree_learner, const Tree *tree, int cur_tree_id)
 Adding prediction score, only used for training data. The training data is partitioned into tree leaves after training Based on which We can get prediction quickly.
 
void AddScore (const Tree *tree, const data_size_t *data_indices, data_size_t data_cnt, int cur_tree_id)
 Using tree model to get prediction number, then adding to scores for parts of data Used for prediction of training out-of-bag data.
 
const double * score () const
 Pointer of score.
 
data_size_t num_data () const
 
ScoreUpdateroperator= (const ScoreUpdater &)=delete
 Disable copy.
 
 ScoreUpdater (const ScoreUpdater &)=delete
 Disable copy.
 

Detailed Description

Used to store and update score for data.

Constructor & Destructor Documentation

◆ ScoreUpdater()

LightGBM::ScoreUpdater::ScoreUpdater ( const Dataset data,
int  num_tree_per_iteration 
)
inline

Constructor, will pass a const pointer of dataset.

Parameters
dataThis class will bind with this data set

Member Function Documentation

◆ AddScore() [1/3]

void LightGBM::ScoreUpdater::AddScore ( const Tree tree,
const data_size_t data_indices,
data_size_t  data_cnt,
int  cur_tree_id 
)
inline

Using tree model to get prediction number, then adding to scores for parts of data Used for prediction of training out-of-bag data.

Parameters
treeTrained tree model
data_indicesIndices of data that will be processed
data_cntNumber of data that will be processed
cur_tree_idCurrent tree for multiclass training

◆ AddScore() [2/3]

void LightGBM::ScoreUpdater::AddScore ( const Tree tree,
int  cur_tree_id 
)
inline

Using tree model to get prediction number, then adding to scores for all data Note: this function generally will be used on validation data too.

Parameters
treeTrained tree model
cur_tree_idCurrent tree for multiclass training

◆ AddScore() [3/3]

void LightGBM::ScoreUpdater::AddScore ( const TreeLearner tree_learner,
const Tree tree,
int  cur_tree_id 
)
inline

Adding prediction score, only used for training data. The training data is partitioned into tree leaves after training Based on which We can get prediction quickly.

Parameters
tree_learner
cur_tree_idCurrent tree for multiclass training

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