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()
| xgboost::TreeUpdater::TreeUpdater |
( |
const Context * |
ctx | ) |
|
|
inlineexplicit |
◆ ~TreeUpdater()
| xgboost::TreeUpdater::~TreeUpdater |
( |
| ) |
|
|
overridedefault |
◆ CanModifyTree()
| virtual bool xgboost::TreeUpdater::CanModifyTree |
( |
| ) |
const |
|
inlinevirtual |
Whether this updater can be used for updating existing trees.
Some updaters are used for building new trees (like hist), while some others are used for modifying existing trees (like prune). Return true if it can modify existing trees.
◆ Configure()
| virtual void xgboost::TreeUpdater::Configure |
( |
const Args & |
args | ) |
|
|
pure virtual |
Initialize the updater with given arguments.
- Parameters
-
| args | arguments to the objective function. |
◆ Create()
Create a tree updater given name.
- Parameters
-
| name | Name of the tree updater. |
| ctx | A global runtime parameter |
| task | Infomation about the objective. |
◆ Name()
| virtual char const* xgboost::TreeUpdater::Name |
( |
| ) |
const |
|
pure virtual |
◆ Update()
perform update to the tree models
- Parameters
-
| param | Hyper-parameter for constructing trees. |
| gpair | The gradient pair statistics of the data |
| p_fmat | The data matrix passed to the updater. |
| out_position | The leaf index for each row. The index is negated if that row is removed during sampling. So the 3th node is ~3. |
| out_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 a random forest style model.
◆ ctx_
| Context const* xgboost::TreeUpdater::ctx_ = nullptr |
|
protected |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/xgboost/checkouts/stable/include/xgboost/tree_updater.h