xgboost
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
xgboost::common::SketchContainerImpl< WQSketch > Class Template Reference

#include <quantile.h>

Collaboration diagram for xgboost::common::SketchContainerImpl< WQSketch >:
Collaboration graph

Public Member Functions

 SketchContainerImpl (std::vector< bst_row_t > columns_size, int32_t max_bins, common::Span< FeatureType const > feature_types, bool use_group, int32_t n_threads)
 
void GatherSketchInfo (std::vector< typename WQSketch::SummaryContainer > const &reduced, std::vector< bst_row_t > *p_worker_segments, std::vector< bst_row_t > *p_sketches_scan, std::vector< typename WQSketch::Entry > *p_global_sketches)
 
void AllReduce (std::vector< typename WQSketch::SummaryContainer > *p_reduced, std::vector< int32_t > *p_num_cuts)
 
void PushRowPage (SparsePage const &page, MetaInfo const &info, Span< float const > hessian={})
 
void MakeCuts (HistogramCuts *cuts)
 

Static Public Member Functions

static bool UseGroup (MetaInfo const &info)
 
static std::vector< bst_row_tCalcColumnSize (SparsePage const &page, bst_feature_t const n_columns, size_t const nthreads)
 
static std::vector< bst_feature_tLoadBalance (SparsePage const &page, bst_feature_t n_columns, size_t const nthreads)
 
static uint32_t SearchGroupIndFromRow (std::vector< bst_uint > const &group_ptr, size_t const base_rowid)
 

Protected Attributes

std::vector< WQSketch > sketches_
 
std::vector< std::set< float > > categories_
 
const std::vector< FeatureTypefeature_types_
 
std::vector< bst_row_tcolumns_size_
 
int32_t max_bins_
 
bool use_group_ind_ {false}
 
int32_t n_threads_
 
bool has_categorical_ {false}
 
Monitor monitor_
 

Detailed Description

template<typename WQSketch>
class xgboost::common::SketchContainerImpl< WQSketch >

A sketch matrix storing sketches for each feature.

Constructor & Destructor Documentation

◆ SketchContainerImpl()

template<typename WQSketch >
xgboost::common::SketchContainerImpl< WQSketch >::SketchContainerImpl ( std::vector< bst_row_t columns_size,
int32_t  max_bins,
common::Span< FeatureType const >  feature_types,
bool  use_group,
int32_t  n_threads 
)

Member Function Documentation

◆ AllReduce()

template<typename WQSketch >
void xgboost::common::SketchContainerImpl< WQSketch >::AllReduce ( std::vector< typename WQSketch::SummaryContainer > *  p_reduced,
std::vector< int32_t > *  p_num_cuts 
)

◆ CalcColumnSize()

template<typename WQSketch >
static std::vector<bst_row_t> xgboost::common::SketchContainerImpl< WQSketch >::CalcColumnSize ( SparsePage const &  page,
bst_feature_t const  n_columns,
size_t const  nthreads 
)
static

◆ GatherSketchInfo()

template<typename WQSketch >
void xgboost::common::SketchContainerImpl< WQSketch >::GatherSketchInfo ( std::vector< typename WQSketch::SummaryContainer > const &  reduced,
std::vector< bst_row_t > *  p_worker_segments,
std::vector< bst_row_t > *  p_sketches_scan,
std::vector< typename WQSketch::Entry > *  p_global_sketches 
)

◆ LoadBalance()

template<typename WQSketch >
static std::vector<bst_feature_t> xgboost::common::SketchContainerImpl< WQSketch >::LoadBalance ( SparsePage const &  page,
bst_feature_t  n_columns,
size_t const  nthreads 
)
static

◆ MakeCuts()

template<typename WQSketch >
void xgboost::common::SketchContainerImpl< WQSketch >::MakeCuts ( HistogramCuts cuts)

◆ PushRowPage()

template<typename WQSketch >
void xgboost::common::SketchContainerImpl< WQSketch >::PushRowPage ( SparsePage const &  page,
MetaInfo const &  info,
Span< float const >  hessian = {} 
)

◆ SearchGroupIndFromRow()

template<typename WQSketch >
static uint32_t xgboost::common::SketchContainerImpl< WQSketch >::SearchGroupIndFromRow ( std::vector< bst_uint > const &  group_ptr,
size_t const  base_rowid 
)
inlinestatic

◆ UseGroup()

template<typename WQSketch >
static bool xgboost::common::SketchContainerImpl< WQSketch >::UseGroup ( MetaInfo const &  info)
inlinestatic

Member Data Documentation

◆ categories_

template<typename WQSketch >
std::vector<std::set<float> > xgboost::common::SketchContainerImpl< WQSketch >::categories_
protected

◆ columns_size_

template<typename WQSketch >
std::vector<bst_row_t> xgboost::common::SketchContainerImpl< WQSketch >::columns_size_
protected

◆ feature_types_

template<typename WQSketch >
const std::vector<FeatureType> xgboost::common::SketchContainerImpl< WQSketch >::feature_types_
protected

◆ has_categorical_

template<typename WQSketch >
bool xgboost::common::SketchContainerImpl< WQSketch >::has_categorical_ {false}
protected

◆ max_bins_

template<typename WQSketch >
int32_t xgboost::common::SketchContainerImpl< WQSketch >::max_bins_
protected

◆ monitor_

template<typename WQSketch >
Monitor xgboost::common::SketchContainerImpl< WQSketch >::monitor_
protected

◆ n_threads_

template<typename WQSketch >
int32_t xgboost::common::SketchContainerImpl< WQSketch >::n_threads_
protected

◆ sketches_

template<typename WQSketch >
std::vector<WQSketch> xgboost::common::SketchContainerImpl< WQSketch >::sketches_
protected

◆ use_group_ind_

template<typename WQSketch >
bool xgboost::common::SketchContainerImpl< WQSketch >::use_group_ind_ {false}
protected

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