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;
80 const int ,
const int ) {
84 virtual char const*
Name()
const = 0;
98 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
99 std::function<TreeUpdater* ()> > {
114 #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \
115 static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \
116 __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \
117 ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name)
120 #endif // XGBOOST_TREE_UPDATER_H_
virtual bool UpdatePredictionCacheMulticlass(const DMatrix *, HostDeviceVector< bst_float > *, const int, const int)
Definition: tree_updater.h:78
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:97
defines configuration macros of xgboost.
Internal data structured used by XGBoost during training.
Definition: data.h:449
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 *, HostDeviceVector< bst_float > *)
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