xgboost

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

`#include <generic_parameters.h>`

Inheritance diagram for xgboost::GenericParameter:
Collaboration diagram for xgboost::GenericParameter:

## Public Member Functions
| GenericParameter ()
void | ConfigureGpuId (bool require_gpu)
| Configure the parameter ‘gpu_id’. More...
int32_t | Threads () const
bool | IsCPU () const
| DMLC_DECLARE_PARAMETER (GenericParameter)
Public Member Functions inherited from xgboost::XGBoostParameter< GenericParameter >
Args | UpdateAllowUnknown (Container const &kwargs)
bool | GetInitialised () const

## Public Attributes
int64_t | seed { kDefaultSeed }
bool | seed_per_iteration {false}
int | nthread {0}
int | gpu_id {kCpuId}
bool | fail_on_invalid_gpu_id {false}
bool | validate_parameters {false}

## Static Public Attributes
static constexpr int32_t | kCpuId = -1
static constexpr int64_t | kDefaultSeed = 0

## Additional Inherited Members
Protected Attributes inherited from xgboost::XGBoostParameter< GenericParameter >
bool | initialised_

## Constructor & Destructor Documentation

## ◆ GenericParameter()

xgboost::GenericParameter::GenericParameter | ( |  | ) |

## Member Function Documentation

## ◆ ConfigureGpuId()

void xgboost::GenericParameter::ConfigureGpuId | ( | bool | require_gpu | ) |

Configure the parameter ‘gpu_id’.

Parameters

  require_gpu | Whether GPU is explicitly required from user.

## ◆ DMLC_DECLARE_PARAMETER()

xgboost::GenericParameter::DMLC_DECLARE_PARAMETER | ( | GenericParameter |  | ) |
| inline

## ◆ IsCPU()

bool xgboost::GenericParameter::IsCPU | ( |  | ) | const
| inline

## ◆ Threads()

int32_t xgboost::GenericParameter::Threads | ( |  | ) | const

Return automatically chosen threads.

## Member Data Documentation

## ◆ fail_on_invalid_gpu_id

bool xgboost::GenericParameter::fail_on_invalid_gpu_id {false}

## ◆ gpu_id

int xgboost::GenericParameter::gpu_id {kCpuId}

## ◆ kCpuId

constexpr int32_t xgboost::GenericParameter::kCpuId = -1
| static constexpr

## ◆ kDefaultSeed

constexpr int64_t xgboost::GenericParameter::kDefaultSeed = 0
| static constexpr

## ◆ nthread

int xgboost::GenericParameter::nthread {0}

## ◆ seed

int64_t xgboost::GenericParameter::seed { kDefaultSeed }

## ◆ seed_per_iteration

bool xgboost::GenericParameter::seed_per_iteration {false}

## ◆ validate_parameters

bool xgboost::GenericParameter::validate_parameters {false}

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

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