xgboost

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
xgboost::common::QuantileSketchTemplate< DType, RType, TSummary > Class Template Reference

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

`#include <quantile.h>`

Collaboration diagram for xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >:

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

## Public Types
using | Summary = TSummary
| type of summary type More...
using | Entry = typename Summary::Entry
| the entry type More...

## Public Member Functions
void | Init (size_t maxn, double eps)
| initialize the quantile sketch, given the performance specification More...
void | Push (DType x, RType w=1)
| add an element to a sketch More...
void | PushSummary (const Summary &summary)
void | PushTemp ()
| push up temp More...
void | GetSummary (SummaryContainer *out)
| get the summary after finalize More...
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)

## Public Attributes
Summary::Queue | inqueue
size_t | nlevel
size_t | limit_size
std::vector< Summary > | level
std::vector< Entry > | data
SummaryContainer | temp

## Static Public Attributes
static constexpr float | 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

  DType | type of data content
  RType | type of rank
  TSummary | actual summary data structure it uses

## Member Typedef Documentation

## ◆ Entry

template<typename DType , typename RType , class TSummary >

using xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::Entry = typename Summary::Entry

the entry type

## ◆ Summary

template<typename DType , typename RType , class TSummary >

using xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::Summary = TSummary

type of summary type

## Member Function Documentation

## ◆ CheckValid()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::CheckValid | ( | RType | eps | ) | const
| inline

## ◆ GetSummary()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::GetSummary | ( | SummaryContainer * | out | ) |
| inline

get the summary after finalize

## ◆ 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

  maxn | maximum number of data points can be feed into sketch
  eps | accuracy level of summary

## ◆ InitLevel()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::InitLevel | ( | size_t | nlevel | ) |
| inline

## ◆ LimitSizeLevel()

template<typename DType , typename RType , class TSummary >

static void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::LimitSizeLevel | ( | size_t | maxn,
|  | double | eps,
|  | size_t * | out_nlevel,
|  | size_t * | out_limit_size
| ) |  |
| inline static

## ◆ 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

  x | The element added to the sketch
  w | The weight of the element.

## ◆ PushSummary()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::PushSummary | ( | const Summary & | summary | ) |
| inline

## ◆ PushTemp()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::PushTemp | ( |  | ) |
| inline

push up temp

## Member Data Documentation

## ◆ data

template<typename DType , typename RType , class TSummary >

std::vector<Entry> xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::data

## ◆ inqueue

template<typename DType , typename RType , class TSummary >

Summary::Queue xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::inqueue

## ◆ kFactor

template<typename DType , typename RType , class TSummary >

constexpr float xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::kFactor = 8.0
| static constexpr

## ◆ level

template<typename DType , typename RType , class TSummary >

std::vector<Summary> xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::level

## ◆ limit_size

template<typename DType , typename RType , class TSummary >

size_t xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::limit_size

## ◆ nlevel

template<typename DType , typename RType , class TSummary >

size_t xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::nlevel

## ◆ temp

template<typename DType , typename RType , class TSummary >

SummaryContainer xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::temp

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

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