8 #ifndef XGBOOST_TREE_UPDATER_H_ 9 #define XGBOOST_TREE_UPDATER_H_ 11 #include <dmlc/registry.h> 61 const std::vector<RegTree*>& trees) = 0;
78 virtual char const*
Name()
const = 0;
92 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
93 std::function<TreeUpdater* ()> > {
108 #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \ 109 static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \ 110 __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \ 111 ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name) 114 #endif // XGBOOST_TREE_UPDATER_H_ Definition: host_device_vector.h:85
Registry entry for tree updater.
Definition: tree_updater.h:91
std::vector< std::pair< std::string, std::string > > Args
Definition: base.h:245
The input data structure of xgboost.
Definition: generic_parameters.h:14
Defines the abstract interface for different components in XGBoost.
Internal data structured used by XGBoost during training. There are two ways to create a customized D...
Definition: data.h:451
A device-and-host vector abstraction layer.
virtual bool UpdatePredictionCache(const DMatrix *data, HostDeviceVector< bst_float > *out_preds)
determines whether updater has enough knowledge about a given dataset to quickly update prediction ca...
Definition: tree_updater.h:73
virtual void Configure(const Args &args)=0
Initialize the updater with given arguments.
static TreeUpdater * Create(const std::string &name, GenericParameter const *tparam)
Create a tree updater given name.
virtual void Update(HostDeviceVector< GradientPair > *gpair, DMatrix *data, const std::vector< RegTree *> &trees)=0
perform update to the tree models
interface of tree update module, that performs update of a tree.
Definition: tree_updater.h:31
namespace of xgboost
Definition: base.h:102
defines configuration macros of xgboost.
virtual char const * Name() const =0
GenericParameter const * tparam_
Definition: tree_updater.h:33
~TreeUpdater() override=default
virtual destructor
virtual bool CanModifyTree() const
Whether this updater can be used for updating existing trees.
Definition: tree_updater.h:49