xgboost
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
xgboost::common Namespace Reference

Namespaces

 base64
 namespace of base64 decoding and encoding table
 
 detail
 

Classes

class  Base64InStream
 the stream that reads from base64, note we take from file pointers More...
 
class  Base64OutStream
 the stream that write to base64, note we take from file pointers More...
 
struct  BitMap
 bit map that contains set of bit indicators More...
 
class  Column
 a column storage, to be used with ApplySplit. Note that each bin id is stored as index[i] + index_base. More...
 
class  ColumnMatrix
 a collection of columns, with support for construction from GHistIndexMatrix. More...
 
class  ColumnSampler
 Handles selection of columns due to colsample_bytree, colsample_bylevel and colsample_bynode parameters. Should be initialised before tree construction and to reset when tree construction is completed. More...
 
class  CompressedBufferWriter
 Writes bit compressed symbols to a memory buffer. Use CompressedIterator to read symbols back from buffer. Currently limited to a maximum symbol size of 28 bits. More...
 
class  CompressedIterator
 Read symbols from a bit compressed memory buffer. Usable on device and host. More...
 
class  ConfigIterator
 an iterator that iterates over a configure file and gets the configures More...
 
class  ConfigReaderBase
 base implementation of config reader More...
 
class  ConfigStreamReader
 an iterator use stream base, allows use all types of istream More...
 
class  GHistBuilder
 builder for histograms of gradient statistics More...
 
struct  GHistIndexBlock
 
class  GHistIndexBlockMatrix
 
struct  GHistIndexMatrix
 preprocessed global index matrix, in CSR format Transform floating values to integer index in histogram This is a global histogram index. More...
 
class  GKQuantileSketch
 Quantile sketch use WQSummary. More...
 
struct  GKSummary
 traditional GK summary More...
 
class  HistCollection
 histogram of gradient statistics for multiple nodes More...
 
struct  HistCutMatrix
 Cut configuration for all the features. More...
 
struct  Monitor
 Timing utility used to measure total method execution time over the lifetime of the containing object. More...
 
struct  ParallelGroupBuilder
 multi-thread version of group builder More...
 
class  PeekableInStream
 Input stream that support additional PeekRead operation, besides read. More...
 
class  QuantileSketchTemplate
 template for all quantile sketch algorithm that uses merge/prune scheme More...
 
class  Range
 
class  RowSetCollection
 collection of rowset More...
 
struct  SimpleArray
 
class  Span
 span class implementation, based on ISO++20 span<T>. The interface should be the same. More...
 
class  StreamBufferReader
 buffer reader of the stream that allows you to get More...
 
struct  Timer
 
class  Transform
 Do Transformation on HostDeviceVectors. More...
 
struct  WQSummary
 experimental wsummary More...
 
class  WQuantileSketch
 Quantile sketch use WQSummary. More...
 
struct  WXQSummary
 try to do efficient pruning More...
 
class  WXQuantileSketch
 Quantile sketch use WXQSummary. More...
 

Typedefs

using CompressedByteT = unsigned char
 
using GHistIndexRow = Span< uint32_t const >
 A single row in global histogram index. Directly represent the global index in the histogram entry. More...
 
using GHistRow = Span< tree::GradStats >
 histogram of graident statistics for a single node. Consists of multiple GradStats, each entry showing total graident statistics for that particular bin Uses global bin id so as to represent all features simultaneously More...
 
using MemoryFixSizeBuffer = rabit::utils::MemoryFixSizeBuffer
 
using MemoryBufferStream = rabit::utils::MemoryBufferStream
 
using RandomEngine = std::mt19937
 Define mt19937 as default type Random Engine. More...
 
using GlobalRandomEngine = RandomEngine
 global random engine More...
 

Enumerations

enum  ColumnType { kDenseColumn, kSparseColumn }
 column type More...
 
enum  byte : unsigned char
 

Functions

std::vector< std::string > Split (const std::string &s, char delim)
 Split a string by delimiter. More...
 
template<typename T >
std::string ToString (const T &data)
 
void DeviceSketch (const SparsePage &batch, const MetaInfo &info, const tree::TrainParam &param, HistCutMatrix *hmat, int gpu_batch_nrows)
 Builds the cut matrix on the GPU. More...
 
XGBOOST_DEVICE float Sigmoid (float x)
 calculate the sigmoid of the input. More...
 
template<typename Iterator >
XGBOOST_DEVICE void Softmax (Iterator start, Iterator end)
 Do inplace softmax transformaton on start to end. More...
 
template<typename Iterator >
XGBOOST_DEVICE Iterator FindMaxIndex (Iterator begin, Iterator end)
 Find the maximum iterator within the iterators. More...
 
float LogSum (float x, float y)
 perform numerically safe logsum More...
 
template<typename Iterator >
float LogSum (Iterator begin, Iterator end)
 perform numerically safe logsum More...
 
template<typename T >
bool CheckNAN (T v)
 
template<typename T >
XGBOOST_DEVICELogGamma (T v)
 
GlobalRandomEngineGlobalRandom ()
 global singleton of a random engine. This random engine is thread-local and only visible to current thread. More...
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE bool operator== (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool operator!= (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool operator< (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool operator<= (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool operator> (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool operator>= (Span< T, X > l, Span< U, Y > r)
 
template<class T , detail::ptrdiff_t E>
XGBOOST_DEVICE auto as_bytes (Span< T, E > s) __span_noexcept -> Span< const byte, detail::ExtentAsBytesValue< T, E >::value >
 
template<class T , detail::ptrdiff_t E>
XGBOOST_DEVICE auto as_writable_bytes (Span< T, E > s) __span_noexcept -> Span< byte, detail::ExtentAsBytesValue< T, E >::value >
 

Variables

constexpr detail::ptrdiff_t dynamic_extent = -1
 
constexpr size_t kBlockThreads = 256
 

Typedef Documentation

◆ CompressedByteT

using xgboost::common::CompressedByteT = typedef unsigned char

◆ GHistIndexRow

using xgboost::common::GHistIndexRow = typedef Span<uint32_t const>

A single row in global histogram index. Directly represent the global index in the histogram entry.

◆ GHistRow

using xgboost::common::GHistRow = typedef Span<tree::GradStats>

histogram of graident statistics for a single node. Consists of multiple GradStats, each entry showing total graident statistics for that particular bin Uses global bin id so as to represent all features simultaneously

◆ GlobalRandomEngine

global random engine

◆ MemoryBufferStream

using xgboost::common::MemoryBufferStream = typedef rabit::utils::MemoryBufferStream

◆ MemoryFixSizeBuffer

using xgboost::common::MemoryFixSizeBuffer = typedef rabit::utils::MemoryFixSizeBuffer

◆ RandomEngine

using xgboost::common::RandomEngine = typedef std::mt19937

Define mt19937 as default type Random Engine.

Enumeration Type Documentation

◆ byte

enum xgboost::common::byte : unsigned char
strong

◆ ColumnType

column type

Enumerator
kDenseColumn 
kSparseColumn 

Function Documentation

◆ as_bytes()

template<class T , detail::ptrdiff_t E>
XGBOOST_DEVICE auto xgboost::common::as_bytes ( Span< T, E >  s) -> Span<const byte, detail::ExtentAsBytesValue<T, E>::value>

◆ as_writable_bytes()

template<class T , detail::ptrdiff_t E>
XGBOOST_DEVICE auto xgboost::common::as_writable_bytes ( Span< T, E >  s) -> Span<byte, detail::ExtentAsBytesValue<T, E>::value>

◆ CheckNAN()

template<typename T >
bool xgboost::common::CheckNAN ( v)
inline

◆ DeviceSketch()

void xgboost::common::DeviceSketch ( const SparsePage batch,
const MetaInfo info,
const tree::TrainParam &  param,
HistCutMatrix hmat,
int  gpu_batch_nrows 
)

Builds the cut matrix on the GPU.

◆ FindMaxIndex()

template<typename Iterator >
XGBOOST_DEVICE Iterator xgboost::common::FindMaxIndex ( Iterator  begin,
Iterator  end 
)
inline

Find the maximum iterator within the iterators.

Parameters
beginThe begining iterator.
endThe end iterator.
Returns
the iterator point to the maximum value.
Template Parameters
IteratorThe type of the iterator.

◆ GlobalRandom()

GlobalRandomEngine& xgboost::common::GlobalRandom ( )

global singleton of a random engine. This random engine is thread-local and only visible to current thread.

◆ LogGamma()

template<typename T >
XGBOOST_DEVICE T xgboost::common::LogGamma ( v)
inline

◆ LogSum() [1/2]

float xgboost::common::LogSum ( float  x,
float  y 
)
inline

perform numerically safe logsum

Parameters
xleft input operand
yright input operand
Returns
log(exp(x) + exp(y))

◆ LogSum() [2/2]

template<typename Iterator >
float xgboost::common::LogSum ( Iterator  begin,
Iterator  end 
)
inline

perform numerically safe logsum

Parameters
beginThe begining iterator.
endThe end iterator.
Returns
the iterator point to the maximum value.
Template Parameters
IteratorThe type of the iterator.

◆ operator!=()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool xgboost::common::operator!= ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ operator<()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool xgboost::common::operator< ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ operator<=()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool xgboost::common::operator<= ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ operator==()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE bool xgboost::common::operator== ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ operator>()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool xgboost::common::operator> ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ operator>=()

template<class T , detail::ptrdiff_t X, class U , detail::ptrdiff_t Y>
XGBOOST_DEVICE constexpr bool xgboost::common::operator>= ( Span< T, X >  l,
Span< U, Y >  r 
)

◆ Sigmoid()

XGBOOST_DEVICE float xgboost::common::Sigmoid ( float  x)
inline

calculate the sigmoid of the input.

Parameters
xinput parameter
Returns
the transformed value.

◆ Softmax()

template<typename Iterator >
XGBOOST_DEVICE void xgboost::common::Softmax ( Iterator  start,
Iterator  end 
)
inline

Do inplace softmax transformaton on start to end.

Template Parameters
IteratorInput iterator type
Parameters
startStart iterator of input
endend iterator of input

◆ Split()

std::vector<std::string> xgboost::common::Split ( const std::string &  s,
char  delim 
)
inline

Split a string by delimiter.

Parameters
sString to be splitted.
delimThe delimiter.

◆ ToString()

template<typename T >
std::string xgboost::common::ToString ( const T &  data)
inline

Variable Documentation

◆ dynamic_extent

constexpr detail::ptrdiff_t xgboost::common::dynamic_extent = -1

◆ kBlockThreads

constexpr size_t xgboost::common::kBlockThreads = 256