xgboost

Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
xgboost::common::HistogramCuts Class Reference

`#include <hist_util.h>`

Collaboration diagram for xgboost::common::HistogramCuts:

## Public Member Functions
| HistogramCuts ()
| HistogramCuts (HistogramCuts const &that)
| HistogramCuts (HistogramCuts &&that) noexcept(true)
HistogramCuts & | operator= (HistogramCuts const &that)
HistogramCuts & | operator= (HistogramCuts &&that) noexcept(true)
uint32_t | FeatureBins (bst_feature_t feature) const
std::vector< uint32_t > const & | Ptrs () const
std::vector< float > const & | Values () const
std::vector< float > const & | MinValues () const
bool | HasCategorical () const
float | MaxCategory () const
void | SetCategorical (bool has_cat, float max_cat)
| Set meta info about categorical features. More...
size_t | TotalBins () const
BinIdx | SearchBin (float value, bst_feature_t column_id, std::vector< uint32_t > const &ptrs, std::vector< float > const &values) const
BinIdx | SearchBin (float value, bst_feature_t column_id) const
BinIdx | SearchBin (Entry const &e) const
| Search the bin index for numerical feature. More...
BinIdx | SearchCatBin (Entry const &e) const
| Search the bin index for categorical feature. More...

## Public Attributes
HostDeviceVector< float > | cut_values_
HostDeviceVector< uint32_t > | cut_ptrs_
HostDeviceVector< float > | min_vals_

## Protected Types
using | BinIdx = uint32_t

## Protected Member Functions
void | Swap (HistogramCuts &&that) noexcept(true)
void | Copy (HistogramCuts const &that)

## Member Typedef Documentation

## ◆ BinIdx

using xgboost::common::HistogramCuts::BinIdx = uint32_t
| protected

## Constructor & Destructor Documentation

## ◆ HistogramCuts() [1/3]

xgboost::common::HistogramCuts::HistogramCuts | ( |  | ) |

## ◆ HistogramCuts() [2/3]

xgboost::common::HistogramCuts::HistogramCuts | ( | HistogramCuts const & | that | ) |
| inline

## ◆ HistogramCuts() [3/3]

xgboost::common::HistogramCuts::HistogramCuts | ( | HistogramCuts && | that | ) |
| inline noexcept

## Member Function Documentation

## ◆ Copy()

void xgboost::common::HistogramCuts::Copy | ( | HistogramCuts const & | that | ) |
| inline protected

## ◆ FeatureBins()

uint32_t xgboost::common::HistogramCuts::FeatureBins | ( | bst_feature_t | feature | ) | const
| inline

## ◆ HasCategorical()

bool xgboost::common::HistogramCuts::HasCategorical | ( |  | ) | const
| inline

## ◆ MaxCategory()

float xgboost::common::HistogramCuts::MaxCategory | ( |  | ) | const
| inline

## ◆ MinValues()

std::vector<float> const& xgboost::common::HistogramCuts::MinValues | ( |  | ) | const
| inline

## ◆ operator=() [1/2]

HistogramCuts& xgboost::common::HistogramCuts::operator= | ( | HistogramCuts && | that | ) |
| inline noexcept

## ◆ operator=() [2/2]

HistogramCuts& xgboost::common::HistogramCuts::operator= | ( | HistogramCuts const & | that | ) |
| inline

## ◆ Ptrs()

std::vector<uint32_t> const& xgboost::common::HistogramCuts::Ptrs | ( |  | ) | const
| inline

## ◆ SearchBin() [1/3]

BinIdx xgboost::common::HistogramCuts::SearchBin | ( | Entry const & | e | ) | const
| inline

Search the bin index for numerical feature.

## ◆ SearchBin() [2/3]

BinIdx xgboost::common::HistogramCuts::SearchBin | ( | float | value,
|  | bst_feature_t | column_id
| ) |  | const
| inline

## ◆ SearchBin() [3/3]

BinIdx xgboost::common::HistogramCuts::SearchBin | ( | float | value,
|  | bst_feature_t | column_id,
|  | std::vector< uint32_t > const & | ptrs,
|  | std::vector< float > const & | values
| ) |  | const
| inline

## ◆ SearchCatBin()

BinIdx xgboost::common::HistogramCuts::SearchCatBin | ( | Entry const & | e | ) | const
| inline

Search the bin index for categorical feature.

## ◆ SetCategorical()

void xgboost::common::HistogramCuts::SetCategorical | ( | bool | has_cat,
|  | float | max_cat
| ) |  |
| inline

Set meta info about categorical features.

Parameters

  has_cat | Do we have categorical feature in the data?
  max_cat | The maximum categorical value in all features.

## ◆ Swap()

void xgboost::common::HistogramCuts::Swap | ( | HistogramCuts && | that | ) |
| inline protected noexcept

## ◆ TotalBins()

size_t xgboost::common::HistogramCuts::TotalBins | ( |  | ) | const
| inline

## ◆ Values()

std::vector<float> const& xgboost::common::HistogramCuts::Values | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ cut_ptrs_

HostDeviceVector<uint32_t> xgboost::common::HistogramCuts::cut_ptrs_

## ◆ cut_values_

HostDeviceVector<float> xgboost::common::HistogramCuts::cut_values_

## ◆ min_vals_

HostDeviceVector<float> xgboost::common::HistogramCuts::min_vals_

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

- /home/runner/work/xgboost/xgboost/src/common/hist_util.h