Used to store and update score for data.
More...
#include <score_updater.hpp>
|
| 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 |
|
ScoreUpdater & | operator= (const ScoreUpdater &)=delete |
| Disable copy.
|
|
| ScoreUpdater (const ScoreUpdater &)=delete |
| Disable copy.
|
|
Used to store and update score for data.
◆ ScoreUpdater()
LightGBM::ScoreUpdater::ScoreUpdater |
( |
const Dataset * |
data, |
|
|
int |
num_tree_per_iteration |
|
) |
| |
|
inline |
Constructor, will pass a const pointer of dataset.
- Parameters
-
data | This class will bind with this data set |
◆ 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
-
tree | Trained tree model |
data_indices | Indices of data that will be processed |
data_cnt | Number of data that will be processed |
cur_tree_id | Current 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
-
tree | Trained tree model |
cur_tree_id | Current 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_id | Current tree for multiclass training |
The documentation for this class was generated from the following file: