Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
xgboost::BatchParam Struct Reference

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.
 

Detailed Description

Parameters for constructing histogram index batches.

Constructor & Destructor Documentation

◆ BatchParam()

xgboost::BatchParam::BatchParam ( bst_bin_t  max_bin,
common::Span< float const >  hessian,
bool  regenerate 
)
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.

Field Documentation

◆ forbid_regen

bool xgboost::BatchParam::forbid_regen {false}

Forbid regenerating the gradient index.

Used for internal validation.

◆ regen

bool xgboost::BatchParam::regen {false}

Whether should we force DMatrix to regenerate the batch.

Only used for GHistIndex.


The documentation for this struct was generated from the following file: