Go to the documentation of this file.
8 #ifndef XGBOOST_TREE_UPDATER_H_
9 #define XGBOOST_TREE_UPDATER_H_
11 #include <dmlc/registry.h>
63 const std::vector<RegTree*>& trees) = 0;
80 virtual char const*
Name()
const = 0;
94 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
95 std::function<TreeUpdater*(ObjInfo task)> > {};
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_
A tensor view with static type and dimension. It implements indexing and slicing.
Definition: linalg.h:244
std::vector< std::pair< std::string, std::string > > Args
Definition: base.h:265
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:51
virtual void Update(HostDeviceVector< GradientPair > *gpair, DMatrix *data, const std::vector< RegTree * > &trees)=0
perform update to the tree models
static TreeUpdater * Create(const std::string &name, GenericParameter const *tparam, ObjInfo task)
Create a tree updater given name.
Definition: generic_parameters.h:15
interface of tree update module, that performs update of a tree.
Definition: tree_updater.h:33
Definition: host_device_vector.h:86
A device-and-host vector abstraction layer.
Registry entry for tree updater.
Definition: tree_updater.h:93
defines configuration macros of xgboost.
virtual bool UpdatePredictionCache(const DMatrix *, linalg::VectorView< float >)
determines whether updater has enough knowledge about a given dataset to quickly update prediction ca...
Definition: tree_updater.h:75
Internal data structured used by XGBoost during training.
Definition: data.h:475
virtual char const * Name() const =0
~TreeUpdater() override=default
virtual destructor
Linear algebra related utilities.
The input data structure of xgboost.
GenericParameter const * ctx_
Definition: tree_updater.h:35
A struct returned by objective, which determines task at hand. The struct is not used by any algorith...
Definition: task.h:24
virtual void Configure(const Args &args)=0
Initialize the updater with given arguments.
namespace of xgboost
Definition: base.h:110