Similar to Cyclic but with random feature shuffling prior to each update.
More...
#include <coordinate_common.h>
|
| void | Setup (Context const *, const gbm::GBLinearModel &model, const std::vector< GradientPair > &, DMatrix *, float, float, int) override |
| | Setting up the selector state prior to looping through features.
|
| |
| int | NextFeature (Context const *, int iteration, const gbm::GBLinearModel &model, int, const std::vector< GradientPair > &, DMatrix *, float, float) override |
| | Select next coordinate to update.
|
| |
|
| FeatureSelector ()=default |
| |
|
virtual | ~FeatureSelector ()=default |
| | virtual destructor
|
| |
Similar to Cyclic but with random feature shuffling prior to each update.
- Note
- Its randomness is controllable by setting a random seed.
◆ NextFeature()
| int xgboost::linear::ShuffleFeatureSelector::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 |
|
) |
| |
|
inlineoverridevirtual |
Select next coordinate to update.
- Parameters
-
| 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. |
- Returns
- The index of the selected feature. -1 indicates none selected.
Implements xgboost::linear::FeatureSelector.
◆ Setup()
Setting up the selector state prior to looping through features.
- Parameters
-
| 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 from xgboost::linear::FeatureSelector.
The documentation for this class was generated from the following file: