Medial Code Documentation
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
xgboost::common::QuantileSketchTemplate< DType, RType, TSummary > Class Template Reference

template for all quantile sketch algorithm that uses merge/prune scheme More...

#include <quantile.h>

Inheritance diagram for xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >:
xgboost::common::WXQuantileSketch< bst_float, bst_float > xgboost::common::WQuantileSketch< DType, RType > xgboost::common::WXQuantileSketch< DType, RType >

Data Structures

struct  SummaryContainer
 same as summary, but use STL to backup the space More...
 

Public Types

using Summary = TSummary
 type of summary type
 
using Entry = typename Summary::Entry
 the entry type
 

Public Member Functions

void Init (size_t maxn, double eps)
 initialize the quantile sketch, given the performance specification
 
void Push (DType x, RType w=1)
 add an element to a sketch
 
void PushSummary (const Summary &summary)
 
void PushTemp ()
 push up temp
 
void GetSummary (SummaryContainer *out)
 get the summary after finalize
 
void CheckValid (RType eps) const
 
void InitLevel (size_t nlevel)
 

Static Public Member Functions

static void LimitSizeLevel (size_t maxn, double eps, size_t *out_nlevel, size_t *out_limit_size)
 

Data Fields

Summary::Queue inqueue
 
size_t nlevel
 
size_t limit_size
 
std::vector< Summarylevel
 
std::vector< Entrydata
 
SummaryContainer temp
 

Static Public Attributes

static float constexpr kFactor = 8.0
 

Detailed Description

template<typename DType, typename RType, class TSummary>
class xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >

template for all quantile sketch algorithm that uses merge/prune scheme

Template Parameters
DTypetype of data content
RTypetype of rank
TSummaryactual summary data structure it uses

Member Function Documentation

◆ Init()

template<typename DType , typename RType , class TSummary >
void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::Init ( size_t  maxn,
double  eps 
)
inline

initialize the quantile sketch, given the performance specification

Parameters
maxnmaximum number of data points can be feed into sketch
epsaccuracy level of summary

◆ Push()

template<typename DType , typename RType , class TSummary >
void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::Push ( DType  x,
RType  w = 1 
)
inline

add an element to a sketch

Parameters
xThe element added to the sketch
wThe weight of the element.

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