Medial Code Documentation
|
Abstract class for stateful feature selection or ordering in coordinate descent algorithms. More...
#include <coordinate_common.h>
Public Member Functions | |
virtual | ~FeatureSelector ()=default |
virtual destructor | |
virtual void | Setup (Context const *, const gbm::GBLinearModel &, const std::vector< GradientPair > &, DMatrix *, float, float, int) |
Setting up the selector state prior to looping through features. | |
virtual int | NextFeature (Context const *ctx, int iteration, const gbm::GBLinearModel &model, int group_idx, const std::vector< GradientPair > &gpair, DMatrix *p_fmat, float alpha, float lambda)=0 |
Select next coordinate to update. | |
Static Public Member Functions | |
static FeatureSelector * | Create (int choice) |
factory method | |
Abstract class for stateful feature selection or ordering in coordinate descent algorithms.
|
pure virtual |
Select next coordinate to update.
ctx | Booster context |
iteration | The iteration in a loop through features |
model | The model. |
group_idx | Zero-based index of the group. |
gpair | The gpair. |
p_fmat | The feature matrix. |
alpha | Regularisation alpha. |
lambda | Regularisation lambda. |
Implemented in xgboost::linear::CyclicFeatureSelector, xgboost::linear::ShuffleFeatureSelector, xgboost::linear::ThriftyFeatureSelector, xgboost::linear::RandomFeatureSelector, and xgboost::linear::GreedyFeatureSelector.
|
inlinevirtual |
Setting up the selector state prior to looping through features.
ctx | The booster context. |
model | The model. |
gpair | The gpair. |
p_fmat | The feature matrix. |
alpha | Regularisation alpha. |
lambda | Regularisation lambda. |
param | A parameter with algorithm-dependent use. |
Reimplemented in xgboost::linear::GreedyFeatureSelector, xgboost::linear::ShuffleFeatureSelector, and xgboost::linear::ThriftyFeatureSelector.