Medial Code Documentation
|
Handles selection of columns due to colsample_bytree, colsample_bylevel and colsample_bynode parameters. More...
#include <random.h>
Public Member Functions | |
std::shared_ptr< HostDeviceVector< bst_feature_t > > | ColSample (std::shared_ptr< HostDeviceVector< bst_feature_t > > p_features, float colsample) |
ColumnSampler (uint32_t seed) | |
Column sampler constructor. | |
ColumnSampler () | |
Column sampler constructor. | |
void | Init (Context const *ctx, int64_t num_col, std::vector< float > feature_weights, float colsample_bynode, float colsample_bylevel, float colsample_bytree) |
Initialise this object before use. | |
void | Reset () |
Resets this object. | |
std::shared_ptr< HostDeviceVector< bst_feature_t > > | GetFeatureSet (int depth) |
Samples a feature set. | |
Handles selection of columns due to colsample_bytree, colsample_bylevel and colsample_bynode parameters.
Should be initialised before tree construction and to reset when tree construction is completed.
|
inlineexplicit |
Column sampler constructor.
|
inline |
Column sampler constructor.
|
inline |
Samples a feature set.
depth | The tree depth of the node at which to sample. |
|
inline |
Initialise this object before use.
num_col | |
colsample_bynode | |
colsample_bylevel | |
colsample_bytree | |
skip_index_0 | (Optional) True to skip index 0. |