|
Medial Code Documentation
|
column-wise update to construct a tree More...
Data Structures | |
| class | Builder |
| struct | NodeEntry |
| struct | ThreadEntry |
| per thread x per node entry to store tmp data More... | |
Public Member Functions | |
| ColMaker (Context const *ctx) | |
| void | Configure (const Args &args) override |
| Initialize the updater with given arguments. | |
| void | LoadConfig (Json const &in) override |
| Load configuration from JSON object. | |
| void | SaveConfig (Json *p_out) const override |
| Save configuration to JSON object. | |
| char const * | Name () const override |
| void | LazyGetColumnDensity (DMatrix *dmat) |
| void | Update (TrainParam const *param, HostDeviceVector< GradientPair > *gpair, DMatrix *dmat, common::Span< HostDeviceVector< bst_node_t > >, const std::vector< RegTree * > &trees) override |
| perform update to the tree models | |
Public Member Functions inherited from xgboost::TreeUpdater | |
| TreeUpdater (const Context *ctx) | |
| ~TreeUpdater () override=default | |
| virtual destructor | |
| virtual bool | CanModifyTree () const |
| Whether this updater can be used for updating existing trees. | |
| virtual bool | HasNodePosition () const |
Wether the out_position in Update is valid. This determines whether adaptive tree can be used. | |
| virtual bool | UpdatePredictionCache (const DMatrix *, linalg::MatrixView< float >) |
| determines whether updater has enough knowledge about a given dataset to quickly update prediction cache its training data and performs the update if possible. | |
Protected Attributes | |
| ColMakerTrainParam | colmaker_param_ |
| std::vector< float > | column_densities_ |
| FeatureInteractionConstraintHost | interaction_constraints_ |
Protected Attributes inherited from xgboost::TreeUpdater | |
| Context const * | ctx_ = nullptr |
Additional Inherited Members | |
Static Public Member Functions inherited from xgboost::TreeUpdater | |
| static TreeUpdater * | Create (const std::string &name, Context const *ctx, ObjInfo const *task) |
| Create a tree updater given name. | |
column-wise update to construct a tree
|
inlineoverridevirtual |
Initialize the updater with given arguments.
| args | arguments to the objective function. |
Implements xgboost::TreeUpdater.
|
inlineoverridevirtual |
Load configuration from JSON object.
| in | JSON object containing the configuration |
Implements xgboost::Configurable.
|
inlineoverridevirtual |
Implements xgboost::TreeUpdater.
|
inlineoverridevirtual |
Save configuration to JSON object.
| out | pointer to output JSON object |
Implements xgboost::Configurable.
|
inlineoverridevirtual |
perform update to the tree models
| param | Hyper-parameter for constructing trees. |
| gpair | the gradient pair statistics of the data |
| data | The data matrix passed to the updater. |
| out_position | The leaf index for each row. The index is negated if that row is removed during sampling. So the 3th node is ~3. |
| out_trees | references the trees to be updated, updater will change the content of trees note: all the trees in the vector are updated, with the same statistics, but maybe different random seeds, usually one tree is passed in at a time, there can be multiple trees when we train random forest style model |
Implements xgboost::TreeUpdater.