interface of tree update module, that performs update of a tree.
More...
#include <tree_updater.h>
interface of tree update module, that performs update of a tree.
◆ ~TreeUpdater()
virtual xgboost::TreeUpdater::~TreeUpdater |
( |
| ) |
|
|
virtualdefault |
◆ Create()
static TreeUpdater* xgboost::TreeUpdater::Create |
( |
const std::string & |
name | ) |
|
|
static |
Create a tree updater given name.
- Parameters
-
name | Name of the tree updater. |
◆ Init()
virtual void xgboost::TreeUpdater::Init |
( |
const std::vector< std::pair< std::string, std::string > > & |
args | ) |
|
|
pure virtual |
Initialize the updater with given arguments.
- Parameters
-
args | arguments to the objective function. |
◆ Update()
perform update to the tree models
- Parameters
-
gpair | the gradient pair statistics of the data |
data | The data matrix passed to the updater. |
trees | references the trees to be updated, updater will change the content of trees note: all the trees in the vector are updated, with the same statistics, but maybe different random seeds, usually one tree is passed in at a time, there can be multiple trees when we train random forest style model |
◆ UpdatePredictionCache()
determines whether updater has enough knowledge about a given dataset to quickly update prediction cache its training data and performs the update if possible.
- Parameters
-
data | data matrix |
out_preds | prediction cache to be updated |
- Returns
- boolean indicating whether updater has capability to update the prediction cache. If true, the prediction cache will have been updated by the time this function returns.
The documentation for this class was generated from the following file: