Go to the documentation of this file.
8 #ifndef XGBOOST_TREE_UPDATER_H_
9 #define XGBOOST_TREE_UPDATER_H_
11 #include <dmlc/registry.h>
62 const std::vector<RegTree*>& trees) = 0;
79 virtual char const*
Name()
const = 0;
93 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
94 std::function<TreeUpdater* ()> > {
109 #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \
110 static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \
111 __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \
112 ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name)
115 #endif // XGBOOST_TREE_UPDATER_H_
GenericParameter const * tparam_
Definition: tree_updater.h:34
std::vector< std::pair< std::string, std::string > > Args
Definition: base.h:265
virtual bool UpdatePredictionCache(const DMatrix *, VectorView< float >)
determines whether updater has enough knowledge about a given dataset to quickly update prediction ca...
Definition: tree_updater.h:74
Defines the abstract interface for different components in XGBoost.
virtual bool CanModifyTree() const
Whether this updater can be used for updating existing trees.
Definition: tree_updater.h:50
virtual void Update(HostDeviceVector< GradientPair > *gpair, DMatrix *data, const std::vector< RegTree * > &trees)=0
perform update to the tree models
Definition: generic_parameters.h:15
interface of tree update module, that performs update of a tree.
Definition: tree_updater.h:32
Definition: host_device_vector.h:86
A device-and-host vector abstraction layer.
Registry entry for tree updater.
Definition: tree_updater.h:92
defines configuration macros of xgboost.
Internal data structured used by XGBoost during training.
Definition: data.h:469
virtual char const * Name() const =0
~TreeUpdater() override=default
virtual destructor
Linear algebra related utilities.
static TreeUpdater * Create(const std::string &name, GenericParameter const *tparam)
Create a tree updater given name.
The input data structure of xgboost.
A slice for 1 column of MatrixView. Can be extended to row if needed.
Definition: linalg.h:93
virtual void Configure(const Args &args)=0
Initialize the updater with given arguments.
namespace of xgboost
Definition: base.h:110