Medial Code Documentation
|
Parameters for constructing histogram index batches. More...
#include <data.h>
Public Member Functions | |
BatchParam ()=default | |
Exact or others that don't need histogram. | |
BatchParam (bst_bin_t max_bin, double sparse_thresh) | |
Used by the hist tree method. | |
BatchParam (bst_bin_t max_bin, common::Span< float const > hessian, bool regenerate) | |
Used by the approx tree method. | |
bool | ParamNotEqual (BatchParam const &other) const |
bool | Initialized () const |
BatchParam | MakeCache () const |
Make a copy of self for DMatrix to describe how its existing index was generated. | |
Data Fields | |
bst_bin_t | max_bin {0} |
Maximum number of bins per feature for histograms. | |
common::Span< float const > | hess |
Hessian, used for sketching with future approx implementation. | |
bool | regen {false} |
Whether should we force DMatrix to regenerate the batch. | |
bool | forbid_regen {false} |
Forbid regenerating the gradient index. | |
double | sparse_thresh {std::numeric_limits<double>::quiet_NaN()} |
Parameter used to generate column matrix for hist. | |
Parameters for constructing histogram index batches.
|
inline |
Used by the approx tree method.
Get batch with sketch weighted by hessian. The batch will be regenerated if the span is changed, so caller should keep the span for each iteration.
bool xgboost::BatchParam::forbid_regen {false} |
Forbid regenerating the gradient index.
Used for internal validation.
bool xgboost::BatchParam::regen {false} |
Whether should we force DMatrix to regenerate the batch.
Only used for GHistIndex.