xgboost

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

preprocessed global index matrix, in CSR format More...

`#include <hist_util.h>`

Collaboration diagram for xgboost::common::GHistIndexMatrix:

## Public Member Functions
void | Init (DMatrix *p_fmat, int max_num_bins)
template<typename BinIdxType , typename GetOffset >
void | SetIndexData (common::Span< BinIdxType > index_data_span, size_t batch_threads, const SparsePage &batch, size_t rbegin, size_t nbins, GetOffset get_offset)
void | ResizeIndex (const size_t n_index, const bool isDense)
void | GetFeatureCounts (size_t *counts) const
bool | IsDense () const

## Public Attributes
std::vector< size_t > | row_ptr
| row pointer to rows by element position More...
Index | index
| The index data. More...
std::vector< size_t > | hit_count
| hit count of each index More...
HistogramCuts | cut
| The corresponding cuts. More...
DMatrix * | p_fmat
size_t | max_num_bins

## Detailed Description

preprocessed global index matrix, in CSR format

Transform floating values to integer index in histogram This is a global histogram index for CPU histogram. On GPU ellpack page is used.

## Member Function Documentation

## ◆ GetFeatureCounts()

void xgboost::common::GHistIndexMatrix::GetFeatureCounts | ( | size_t * | counts | ) | const
| inline

## ◆ Init()

void xgboost::common::GHistIndexMatrix::Init | ( | DMatrix * | p_fmat,
|  | int | max_num_bins
| ) |  |

## ◆ IsDense()

bool xgboost::common::GHistIndexMatrix::IsDense | ( |  | ) | const
| inline

## ◆ ResizeIndex()

void xgboost::common::GHistIndexMatrix::ResizeIndex | ( | const size_t | n_index,
|  | const bool | isDense
| ) |  |

## ◆ SetIndexData()

template<typename BinIdxType , typename GetOffset >

void xgboost::common::GHistIndexMatrix::SetIndexData | ( | common::Span< BinIdxType > | index_data_span,
|  | size_t | batch_threads,
|  | const SparsePage & | batch,
|  | size_t | rbegin,
|  | size_t | nbins,
|  | GetOffset | get_offset
| ) |  |
| inline

## Member Data Documentation

## ◆ cut

HistogramCuts xgboost::common::GHistIndexMatrix::cut

The corresponding cuts.

## ◆ hit_count

std::vector<size_t> xgboost::common::GHistIndexMatrix::hit_count

hit count of each index

## ◆ index

Index xgboost::common::GHistIndexMatrix::index

The index data.

## ◆ max_num_bins

size_t xgboost::common::GHistIndexMatrix::max_num_bins

## ◆ p_fmat

DMatrix* xgboost::common::GHistIndexMatrix::p_fmat

## ◆ row_ptr

std::vector<size_t> xgboost::common::GHistIndexMatrix::row_ptr

row pointer to rows by element position

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

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