xgboost
Public Member Functions | Public Attributes | List of all members
xgboost::BatchParam Struct Reference

Parameters for constructing histogram index batches. More...

#include <data.h>

Collaboration diagram for xgboost::BatchParam:
Collaboration graph

Public Member Functions

 BatchParam ()=default
 Exact or others that don't need histogram. More...
 
 BatchParam (bst_bin_t max_bin, double sparse_thresh)
 Used by the hist tree method. More...
 
 BatchParam (bst_bin_t max_bin, common::Span< float const > hessian, bool regenerate)
 Used by the approx tree method. More...
 
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. More...
 

Public Attributes

bst_bin_t max_bin {0}
 Maximum number of bins per feature for histograms. More...
 
common::Span< float const > hess
 Hessian, used for sketching with future approx implementation. More...
 
bool regen {false}
 Whether should we force DMatrix to regenerate the batch. Only used for GHistIndex. More...
 
bool forbid_regen {false}
 Forbid regenerating the gradient index. Used for internal validation. More...
 
double sparse_thresh {std::numeric_limits<double>::quiet_NaN()}
 Parameter used to generate column matrix for hist. More...
 

Detailed Description

Parameters for constructing histogram index batches.

Constructor & Destructor Documentation

◆ BatchParam() [1/3]

xgboost::BatchParam::BatchParam ( )
default

Exact or others that don't need histogram.

◆ BatchParam() [2/3]

xgboost::BatchParam::BatchParam ( bst_bin_t  max_bin,
double  sparse_thresh 
)
inline

Used by the hist tree method.

◆ BatchParam() [3/3]

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.

Member Function Documentation

◆ Initialized()

bool xgboost::BatchParam::Initialized ( ) const
inline

◆ MakeCache()

BatchParam xgboost::BatchParam::MakeCache ( ) const
inline

Make a copy of self for DMatrix to describe how its existing index was generated.

◆ ParamNotEqual()

bool xgboost::BatchParam::ParamNotEqual ( BatchParam const &  other) const
inline

Member Data Documentation

◆ forbid_regen

bool xgboost::BatchParam::forbid_regen {false}

Forbid regenerating the gradient index. Used for internal validation.

◆ hess

common::Span<float const> xgboost::BatchParam::hess

Hessian, used for sketching with future approx implementation.

◆ max_bin

bst_bin_t xgboost::BatchParam::max_bin {0}

Maximum number of bins per feature for histograms.

◆ regen

bool xgboost::BatchParam::regen {false}

Whether should we force DMatrix to regenerate the batch. Only used for GHistIndex.

◆ sparse_thresh

double xgboost::BatchParam::sparse_thresh {std::numeric_limits<double>::quiet_NaN()}

Parameter used to generate column matrix for hist.


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