|
| Dart (LearnerModelParam const *booster_config, Context const *ctx) |
|
void | Configure (const Args &cfg) override |
| Set the configuration of gradient boosting. User must call configure once before InitModel and Training.
|
|
void | Slice (int32_t layer_begin, int32_t layer_end, int32_t step, GradientBooster *out, bool *out_of_bound) const final |
|
void | SaveModel (Json *p_out) const override |
| saves the model config to a JSON object
|
|
void | LoadModel (Json const &in) override |
| load the model from a JSON object
|
|
void | Load (dmlc::Stream *fi) override |
| load model from stream
|
|
void | Save (dmlc::Stream *fo) const override |
| save model to stream.
|
|
void | LoadConfig (Json const &in) override |
| Load configuration from JSON object.
|
|
void | SaveConfig (Json *p_out) const override |
| Save configuration to JSON object.
|
|
void | PredictBatchImpl (DMatrix *p_fmat, PredictionCacheEntry *p_out_preds, bool training, unsigned layer_begin, unsigned layer_end) const |
|
void | PredictBatch (DMatrix *p_fmat, PredictionCacheEntry *p_out_preds, bool training, bst_layer_t layer_begin, bst_layer_t layer_end) override |
| Generate predictions for given feature matrix.
|
|
void | InplacePredict (std::shared_ptr< DMatrix > p_fmat, float missing, PredictionCacheEntry *p_out_preds, bst_layer_t layer_begin, bst_layer_t layer_end) const override |
| Inplace prediction.
|
|
void | PredictInstance (const SparsePage::Inst &inst, std::vector< bst_float > *out_preds, unsigned layer_begin, unsigned layer_end) override |
| online prediction function, predict score for one instance at a time NOTE: use the batch prediction interface if possible, batch prediction is usually more efficient than online prediction This function is NOT threadsafe, make sure you only call from one thread
|
|
void | PredictContribution (DMatrix *p_fmat, HostDeviceVector< bst_float > *out_contribs, bst_layer_t layer_begin, bst_layer_t layer_end, bool approximate) override |
| feature contributions to individual predictions; the output will be a vector of length (nfeats + 1) * num_output_group * nsample, arranged in that order
|
|
void | PredictInteractionContributions (DMatrix *p_fmat, HostDeviceVector< float > *out_contribs, bst_layer_t layer_begin, bst_layer_t layer_end, bool approximate) override |
|
| GBTree (LearnerModelParam const *booster_config, Context const *ctx) |
|
void | Configure (Args const &cfg) override |
| Set the configuration of gradient boosting. User must call configure once before InitModel and Training.
|
|
void | UpdateTreeLeaf (DMatrix const *p_fmat, HostDeviceVector< float > const &predictions, ObjFunction const *obj, std::int32_t group_idx, std::vector< HostDeviceVector< bst_node_t > > const &node_position, std::vector< std::unique_ptr< RegTree > > *p_trees) |
| Optionally update the leaf value.
|
|
void | DoBoost (DMatrix *p_fmat, HostDeviceVector< GradientPair > *in_gpair, PredictionCacheEntry *predt, ObjFunction const *obj) override |
| Carry out one iteration of boosting.
|
|
bool | UseGPU () const override |
| Whether the current booster uses GPU.
|
|
GBTreeTrainParam const & | GetTrainParam () const |
|
void | Load (dmlc::Stream *fi) override |
| load model from stream
|
|
void | Save (dmlc::Stream *fo) const override |
| save model to stream.
|
|
void | LoadConfig (Json const &in) override |
| Load configuration from JSON object.
|
|
void | SaveConfig (Json *p_out) const override |
| Save configuration to JSON object.
|
|
void | SaveModel (Json *p_out) const override |
| saves the model config to a JSON object
|
|
void | LoadModel (Json const &in) override |
| load the model from a JSON object
|
|
void | Slice (bst_layer_t begin, bst_layer_t end, bst_layer_t step, GradientBooster *out, bool *out_of_bound) const override |
| Slice a model using boosting index.
|
|
std::int32_t | BoostedRounds () const override |
| Return number of boosted rounds.
|
|
bool | ModelFitted () const override |
| Whether the model has already been trained.
|
|
void | PredictBatchImpl (DMatrix *p_fmat, PredictionCacheEntry *out_preds, bool is_training, bst_layer_t layer_begin, bst_layer_t layer_end) const |
|
void | PredictBatch (DMatrix *p_fmat, PredictionCacheEntry *out_preds, bool training, bst_layer_t layer_begin, bst_layer_t layer_end) override |
| Generate predictions for given feature matrix.
|
|
void | InplacePredict (std::shared_ptr< DMatrix > p_m, float missing, PredictionCacheEntry *out_preds, bst_layer_t layer_begin, bst_layer_t layer_end) const override |
| Inplace prediction.
|
|
void | FeatureScore (std::string const &importance_type, common::Span< int32_t const > trees, std::vector< bst_feature_t > *features, std::vector< float > *scores) const override |
|
void | PredictInstance (const SparsePage::Inst &inst, std::vector< bst_float > *out_preds, uint32_t layer_begin, uint32_t layer_end) override |
|
void | PredictLeaf (DMatrix *p_fmat, HostDeviceVector< bst_float > *out_preds, uint32_t layer_begin, uint32_t layer_end) override |
|
void | PredictContribution (DMatrix *p_fmat, HostDeviceVector< float > *out_contribs, bst_layer_t layer_begin, bst_layer_t layer_end, bool approximate) override |
| feature contributions to individual predictions; the output will be a vector of length (nfeats + 1) * num_output_group * nsample, arranged in that order
|
|
void | PredictInteractionContributions (DMatrix *p_fmat, HostDeviceVector< float > *out_contribs, bst_layer_t layer_begin, bst_layer_t layer_end, bool approximate) override |
|
std::vector< std::string > | DumpModel (const FeatureMap &fmap, bool with_stats, std::string format) const override |
| dump the model in the requested format
|
|
| ~GradientBooster () override=default |
| virtual destructor
|
|
virtual void | PredictLeaf (DMatrix *dmat, HostDeviceVector< bst_float > *out_preds, unsigned layer_begin, unsigned layer_end)=0 |
| predict the leaf index of each tree, the output will be nsample * ntree vector this is only valid in gbtree predictor
|
|