Go to the documentation of this file.
8 #ifndef XGBOOST_TREE_UPDATER_H_
9 #define XGBOOST_TREE_UPDATER_H_
11 #include <dmlc/registry.h>
61 const std::vector<RegTree*>& trees) = 0;
81 virtual char const*
Name()
const = 0;
95 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
96 std::function<TreeUpdater* ()> > {
111 #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \
112 static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \
113 __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \
114 ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name)
117 #endif // XGBOOST_TREE_UPDATER_H_
GenericParameter const * tparam_
Definition: tree_updater.h:33
std::vector< std::pair< std::string, std::string > > Args
Definition: base.h:262
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:49
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:31
Definition: host_device_vector.h:86
A device-and-host vector abstraction layer.
Registry entry for tree updater.
Definition: tree_updater.h:94
defines configuration macros of xgboost.
Internal data structured used by XGBoost during training.
Definition: data.h:454
virtual char const * Name() const =0
~TreeUpdater() override=default
virtual destructor
static TreeUpdater * Create(const std::string &name, GenericParameter const *tparam)
Create a tree updater given name.
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
The input data structure of xgboost.
virtual void Configure(const Args &args)=0
Initialize the updater with given arguments.
namespace of xgboost
Definition: base.h:110