8 #ifndef XGBOOST_TREE_UPDATER_H_ 9 #define XGBOOST_TREE_UPDATER_H_ 11 #include <dmlc/registry.h> 19 #include "../../src/common/host_device_vector.h" 33 virtual void Init(
const std::vector<std::pair<std::string, std::string> >& args) = 0;
45 const std::vector<RegTree*>& trees) = 0;
73 :
public dmlc::FunctionRegEntryBase<TreeUpdaterReg,
74 std::function<TreeUpdater* ()> > {
89 #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \ 90 static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \ 91 __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \ 92 ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name) 95 #endif // XGBOOST_TREE_UPDATER_H_ Definition: host_device_vector.h:200
Registry entry for tree updater.
Definition: tree_updater.h:72
The input data structure of xgboost.
Internal data structured used by XGBoost during training. There are two ways to create a customized D...
Definition: data.h:406
virtual void Init(const std::vector< std::pair< std::string, std::string > > &args)=0
Initialize the updater with given arguments.
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:57
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:25
virtual ~TreeUpdater()=default
virtual destructor
namespace of xgboost
Definition: base.h:79
defines configuration macros of xgboost.
static TreeUpdater * Create(const std::string &name)
Create a tree updater given name.