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

Parameters for constructing batches. More...

#include <data.h>

Collaboration diagram for xgboost::BatchParam:
Collaboration graph

Public Member Functions

 BatchParam ()=default
 
 BatchParam (int32_t device, int32_t max_bin)
 
 BatchParam (int32_t device, int32_t max_bin, common::Span< float > hessian, bool regenerate=false)
 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. More...
 
bool operator!= (const BatchParam &other) const
 

Public Attributes

int gpu_id {-1}
 The GPU device to use. More...
 
int max_bin {0}
 Maximum number of bins per feature for histograms. More...
 
common::Span< float > hess
 Hessian, used for sketching with future approx implementation. More...
 
bool regen {false}
 Whether should DMatrix regenerate the batch. Only used for GHistIndex. More...
 

Detailed Description

Parameters for constructing batches.

Constructor & Destructor Documentation

◆ BatchParam() [1/3]

xgboost::BatchParam::BatchParam ( )
default

◆ BatchParam() [2/3]

xgboost::BatchParam::BatchParam ( int32_t  device,
int32_t  max_bin 
)
inline

◆ BatchParam() [3/3]

xgboost::BatchParam::BatchParam ( int32_t  device,
int32_t  max_bin,
common::Span< float >  hessian,
bool  regenerate = false 
)
inline

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

◆ operator!=()

bool xgboost::BatchParam::operator!= ( const BatchParam other) const
inline

Member Data Documentation

◆ gpu_id

int xgboost::BatchParam::gpu_id {-1}

The GPU device to use.

◆ hess

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

Hessian, used for sketching with future approx implementation.

◆ max_bin

int xgboost::BatchParam::max_bin {0}

Maximum number of bins per feature for histograms.

◆ regen

bool xgboost::BatchParam::regen {false}

Whether should DMatrix regenerate the batch. Only used for GHistIndex.


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