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:
Collaboration graph

Public Member Functions

void Init (DMatrix *p_fmat, int max_num_bins)
 
template<typename BinIdxType >
void SetIndexDataForDense (common::Span< BinIdxType > index_data_span, size_t batch_threads, const SparsePage &batch, size_t rbegin, common::Span< const uint32_t > offsets_span, size_t nbins)
 
void SetIndexDataForSparse (common::Span< uint32_t > index_data_span, size_t batch_threads, const SparsePage &batch, size_t rbegin, size_t nbins)
 
void ResizeIndex (const size_t rbegin, const SparsePage &batch, const size_t n_offsets, 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...
 
DMatrixp_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  rbegin,
const SparsePage batch,
const size_t  n_offsets,
const size_t  n_index,
const bool  isDense 
)

◆ SetIndexDataForDense()

template<typename BinIdxType >
void xgboost::common::GHistIndexMatrix::SetIndexDataForDense ( common::Span< BinIdxType >  index_data_span,
size_t  batch_threads,
const SparsePage batch,
size_t  rbegin,
common::Span< const uint32_t >  offsets_span,
size_t  nbins 
)

◆ SetIndexDataForSparse()

void xgboost::common::GHistIndexMatrix::SetIndexDataForSparse ( common::Span< uint32_t >  index_data_span,
size_t  batch_threads,
const SparsePage batch,
size_t  rbegin,
size_t  nbins 
)

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: