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:

## Public Member Functions
| BatchParam ()=default
| BatchParam (int32_t device, int32_t max_bin)
| BatchParam (int32_t max_bin, double sparse_thresh)
| BatchParam (int32_t max_bin, common::Span< float > hessian, bool regenerate)
| 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!= (BatchParam const &other) const
bool | operator== (BatchParam const &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...
double | sparse_thresh {std::numeric_limits<double>::quiet_NaN()}
| Parameter used to generate column matrix for hist. More...

## Detailed Description

Parameters for constructing batches.

## Constructor & Destructor Documentation

## ◆ BatchParam() [1/4]

xgboost::BatchParam::BatchParam | ( |  | ) |
| default

## ◆ BatchParam() [2/4]

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

## ◆ BatchParam() [3/4]

xgboost::BatchParam::BatchParam | ( | int32_t | max_bin,
|  | double | sparse_thresh
| ) |  |
| inline

## ◆ BatchParam() [4/4]

xgboost::BatchParam::BatchParam | ( | int32_t | max_bin,
|  | common::Span< float > | hessian,
|  | bool | regenerate
| ) |  |
| 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!= | ( | BatchParam const & | other | ) | const
| inline

## ◆ operator==()

bool xgboost::BatchParam::operator== | ( | BatchParam const & | 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.

## ◆ 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:

- /home/runner/work/xgboost/xgboost/include/xgboost/data.h