xgboost
命名空间 | 嵌套类 | 类型定义成员 | 枚举成员 | 函数成员 | 变量成员
xgboost 命名空间参考

多目标树的核心数据结构。 更多信息...

命名空间

 collective
 
 common
 
 detail
 
 gbm
 
 linalg
 
 system
 
 tree
 

class  GradientPairInt64
 高精度梯度对的定点表示。它有一个不同的接口,这样我们就不会在增益计算中意外地使用它。 更多信息...
 
class  DMatrixCache
 线程感知的 DMatrix 相关数据 FIFO 缓存。 更多信息...
 
struct  DeviceSym
 
struct  DeviceOrd
 设备序号的类型。该类型被打包成 32 位,以便在查看 linalg::TensorView 等类型时高效使用。 更多信息...
 
struct  Context
 XGBoost 的运行时上下文。包含线程和设备等信息。 更多信息...
 
class  MetaInfo
 关于数据集的元信息,始终驻留在内存中。 更多信息...
 
struct  Entry
 稀疏向量中的元素。 更多信息...
 
struct  BatchParam
 构建直方图索引批次的参数。 更多信息...
 
struct  HostSparsePageView
 
class  SparsePage
 稀疏批次的内存存储单元,以 CSR 格式存储。 更多信息...
 
class  CSCPage
 
class  ExtSparsePage
 用于导出 DMatrix 的稀疏页面。与 SparsePage 相同,只是类型不同,以防止在内部使用。 更多信息...
 
class  SortedCSCPage
 
class  BatchIteratorImpl
 
class  BatchIterator
 
class  BatchSet
 
struct  ExtMemConfig
 
class  DMatrix
 XGBoost 用于存储所有外部数据的内部数据结构。 更多信息...
 
class  FeatureMap
 特征图数据结构,用于帮助文本模型转储。TODO(tqchen) 考虑使其更轻量。 更多信息...
 
class  GradientBooster
 梯度提升模型的接口。 更多信息...
 
struct  GradientBoosterReg
 树更新器的注册表项。 更多信息...
 
struct  GlobalConfiguration
 
struct  InitNewThread
 
struct  HostDeviceVectorImpl
 
class  HostDeviceVector
 
class  IntrusivePtrCell
 用于将引用计数嵌入客户端对象的辅助类。有关内存顺序的讨论,请参阅 https://boost.ac.cn/doc/libs/1_74_0/doc/html/atomic/usage_examples.html更多信息...
 
class  IntrusivePtr
 侵入式指针的实现。一种智能指针,指向具有嵌入式引用计数器的对象。底层对象必须实现一个友元函数 IntrusivePtrRefCount(),该函数返回引用计数器(类型为 IntrusivePtrCell)。侵入式指针比 std::shared_ptr<> 更快:std::shared_ptr<> 为引用计数器进行额外的内存分配,而侵入式指针则不进行。 更多信息...
 
class  Value
 
class  JsonString
 
class  JsonArray
 
class  JsonTypedArray
 用于 Universal Binary JSON 的类型化数组。 更多信息...
 
class  JsonObject
 
class  JsonNumber
 
class  JsonInteger
 
class  JsonNull
 
class  JsonBoolean
 描述 true 和 false。 更多信息...
 
class  Json
 表示 JSON 格式的数据结构。 更多信息...
 
class  JsonReader
 一个 json 读取器,目前尚未完全支持错误检查和 utf-8。 更多信息...
 
class  JsonWriter
 
class  UBJReader
 UBJSON https://ubjson.org/ 的读取器。 更多信息...
 
class  UBJWriter
 UBJSON https://ubjson.org/ 的写入器。 更多信息...
 
class  Learner
 Learner 类,执行训练和预测。这是 xgboost 训练的用户界面模块。Load/Save 函数对应于 python/R 中使用的模型。 更多信息...
 
struct  LearnerModelParam
 基本模型参数,用于描述助推器。 更多信息...
 
class  LinearUpdater
 线性更新器的接口。 更多信息...
 
struct  LinearUpdaterReg
 线性更新器的注册表项。 更多信息...
 
class  Metric
 用于评估模型性能的评估指标接口。这与训练无关,仅用于评估目的。 更多信息...
 
struct  MetricReg
 Metric 工厂函数的注册表项。附加参数 const char* param 提供 @ 符号后的值,可以为 null。例如,metric map@3,则:param == "3"。 更多信息...
 
struct  Model
 
struct  Configurable
 
class  MultiTargetTree
 多目标模型的树结构。 更多信息...
 
class  ObjFunction
 目标函数的接口。 更多信息...
 
struct  ObjFunctionReg
 目标工厂函数的注册表项。 更多信息...
 
struct  XGBoostParameter
 
struct  PredictionCacheEntry
 包含输入矩阵和关联的缓存预测的指针。 更多信息...
 
class  PredictionContainer
 托管预测缓存的容器。 更多信息...
 
class  Predictor
 对 GBTree 的单个训练实例或批量实例执行预测。所有预测函数都接受 GBTreeModel 和 DMatrix 作为输入,并输出一个预测向量。预测器不修改模型本身的任何状态。 更多信息...
 
struct  PredictorReg
 预测器的注册表项。 更多信息...
 
struct  StringView
 
struct  ObjInfo
 由目标函数返回的结构体,用于确定当前任务。该结构体尚未被任何算法使用,仅用于未来的开发,例如分类拆分。 更多信息...
 
struct  TreeParam
 树的元参数。 更多信息...
 
struct  RTreeNodeStat
 回归树中使用的节点统计信息。 更多信息...
 
class  CopyUniquePtr
 用于定义包含唯一指针的可复制数据结构的辅助函数。 更多信息...
 
class  RegTree
 将回归树定义为最常见的树模型。 更多信息...
 
class  TreeUpdater
 树更新模块的接口,执行树的更新。 更多信息...
 
struct  TreeUpdaterReg
 树更新器的注册表项。 更多信息...
 

类型定义成员

using bst_uint = std::uint32_t
 用于特征索引的无符号整型。 更多信息...
 
using bst_ulong = std::uint64_t
 无符号长整型。 更多信息...
 
using bst_float = float
 浮点类型,用于存储统计信息。 更多信息...
 
using bst_cat_t = std::int32_t
 分类值类型。 更多信息...
 
using bst_feature_t = std::uint32_t
 数据列(特征)索引的类型。 更多信息...
 
using bst_bin_t = std::int32_t
 直方图 bin 索引的类型。有时我们使用 -1 表示无效 bin。 更多信息...
 
using bst_idx_t = std::uint64_t
 数据行索引(样本)的类型。 更多信息...
 
using bst_node_t = std::int32_t
 树节点索引的类型。 更多信息...
 
using bst_group_t = std::uint32_t
 排名组索引的类型。 更多信息...
 
using bst_target_t = std::uint32_t
 用于索引输出目标的类型。 更多信息...
 
using bst_layer_t = std::int32_t
 用于索引 boosting 层的类型。 更多信息...
 
using bst_tree_t = std::int32_t
 用于索引树的类型。 更多信息...
 
using bst_d_ordinal_t = std::int16_t
 CUDA 设备的序号。 更多信息...
 
using GradientPair = detail::GradientPairInternal< float >
 梯度提升中通常需要的梯度统计对。 更多信息...
 
using GradientPairPrecise = detail::GradientPairInternal< double >
 高精度梯度统计对。 更多信息...
 
using Args = std::vector< std::pair< std::string, std::string > >
 
using omp_ulong = dmlc::omp_ulong
 为 openmp 循环定义无符号长整型。 更多信息...
 
using bst_omp_uint = dmlc::omp_uint
 为 openmp 循环定义无符号整型。 更多信息...
 
using XGBoostVersionT = std::int32_t
 用于表示二进制版本号的类型。 更多信息...
 
using GlobalConfigThreadLocalStore = dmlc::ThreadLocalStore< GlobalConfiguration >
 
using F32Array = JsonTypedArray< float, Value::ValueKind::kF32Array >
 用于 32 位浮点数的类型化 UBJSON 数组。 更多信息...
 
using F64Array = JsonTypedArray< double, Value::ValueKind::kF64Array >
 用于 64 位浮点数的类型化 UBJSON 数组。 更多信息...
 
using I8Array = JsonTypedArray< std::int8_t, Value::ValueKind::kI8Array >
 用于 int8_t 的类型化 UBJSON 数组。 更多信息...
 
using U8Array = JsonTypedArray< std::uint8_t, Value::ValueKind::kU8Array >
 用于 uint8_t 的类型化 UBJSON 数组。 更多信息...
 
using I16Array = JsonTypedArray< std::int16_t, Value::ValueKind::kI16Array >
 用于 int16_t 的类型化 UBJSON 数组。 更多信息...
 
using I32Array = JsonTypedArray< std::int32_t, Value::ValueKind::kI32Array >
 用于 int32_t 的类型化 UBJSON 数组。 更多信息...
 
using I64Array = JsonTypedArray< std::int64_t, Value::ValueKind::kI64Array >
 用于 int64_t 的类型化 UBJSON 数组。 更多信息...
 
using Object = JsonObject
 
using Array = JsonArray
 
using Number = JsonNumber
 
using Integer = JsonInteger
 
using Boolean = JsonBoolean
 
using String = JsonString
 
using Null = JsonNull
 

枚举成员

enum class  DataType : uint8_t {
  kFloat32 = 1 , kDouble = 2 , kUInt32 = 3 , kUInt64 = 4 ,
  kStr = 5
}
 xgboost 接口接受的数据类型。 更多信息...
 
enum class  FeatureType : uint8_t { kNumerical = 0 , kCategorical = 1 }
 
enum class  DataSplitMode : int { kRow = 0 , kCol = 1 }
 
enum  GPUAccess { kNone , kRead , kWrite }
 控制从 GPU 的数据访问。 更多信息...
 
enum class  PredictionType : std::uint8_t {
  kValue = 0 , kMargin = 1 , kContribution = 2 , kApproxContribution = 3 ,
  kInteraction = 4 , kApproxInteraction = 5 , kLeaf = 6
}
 
enum class  MultiStrategy : std::int32_t { kOneOutputPerTree = 0 , kMultiOutputTree = 1 }
 构建多目标模型的策略。 更多信息...
 

函数成员

std::ostream & operator<< (std::ostream &os, DeviceOrd ord)
 
template<typename T >
IntrusivePtrCellIntrusivePtrRefCount (T const *ptr) noexcept
 用于返回嵌入式引用计数器的用户定义函数。 更多信息...
 
template<class T , class U >
bool operator== (IntrusivePtr< T > const &x, IntrusivePtr< U > const &y) noexcept
 
template<class T , class U >
bool operator!= (IntrusivePtr< T > const &x, IntrusivePtr< U > const &y) noexcept
 
template<class T , class U >
bool operator== (IntrusivePtr< T > const &x, U *y) noexcept
 
template<class T , class U >
bool operator!= (IntrusivePtr< T > const &x, U *y) noexcept
 
template<class T , class U >
bool operator== (T *x, IntrusivePtr< U > const &y) noexcept
 
template<class T , class U >
bool operator!= (T *x, IntrusivePtr< U > const &y) noexcept
 
template<class T >
bool operator< (IntrusivePtr< T > const &x, IntrusivePtr< T > const &y) noexcept
 
template<class T >
bool operator<= (IntrusivePtr< T > const &x, IntrusivePtr< T > const &y) noexcept
 
template<class T >
bool operator> (IntrusivePtr< T > const &x, IntrusivePtr< T > const &y) noexcept
 
template<class T >
bool operator>= (IntrusivePtr< T > const &x, IntrusivePtr< T > const &y) noexcept
 
template<class E , class T , class Y >
std::basic_ostream< E, T > & operator<< (std::basic_ostream< E, T > &os, IntrusivePtr< Y > const &p)
 
template<typename T >
bool IsA (Value const *value)
 
template<typename T , typename U >
T * Cast (U *value)
 
template<typename T >
bool IsA (Json const &j)
 检查 Json 对象是否具有特定类型。 更多信息...
 
template<typename T , typename U >
auto get (U &json) -> decltype(detail::GetImpl(*Cast< T >(&json.GetValue())))&
 获取 Json 值。 更多信息...
 
template<typename Parameter >
Object ToJson (Parameter const &param)
 将 XGBoost 参数转换为 JSON 对象。 更多信息...
 
template<typename Parameter >
Args FromJson (Json const &obj, Parameter *param)
 从 JSON 对象加载 XGBoost 参数。 更多信息...
 
template<typename T >
BuiltinBSwap (T v)
 
template<typename T , std::enable_if_t< sizeof(T)==1 > * = nullptr>
ToBigEndian (T v)
 
std::ostream & operator<< (std::ostream &os, StringView const v)
 
bool operator== (StringView l, StringView r)
 
bool operator!= (StringView l, StringView r)
 
bool operator< (StringView l, StringView r)
 
bool operator< (std::string const &l, StringView r)
 
bool operator< (StringView l, std::string const &r)
 
StringView MTNotImplemented ()
 

变量成员

constexpr bst_float kRtEps = 1e-6f
 用于最小拆分决策的小 eps 间隔。 更多信息...
 

详细描述

多目标树的核心数据结构。

Copyright 2023 by XGBoost contributors

Copyright 2019-2024, XGBoost Contributors

Copyright 2021-2023, XGBoost Contributors

Copyright 2021-2024, XGBoost Contributors

类型定义文档

◆ Args

using xgboost::Args = typedef std::vector<std::pair<std::string, std::string> >

◆ Array

using xgboost::Array = typedef JsonArray

◆ Boolean

using xgboost::Boolean = typedef JsonBoolean

◆ bst_bin_t

using xgboost::bst_bin_t = typedef std::int32_t

直方图 bin 索引的类型。有时我们使用 -1 表示无效 bin。

◆ bst_cat_t

using xgboost::bst_cat_t = typedef std::int32_t

分类值类型。

◆ bst_d_ordinal_t

using xgboost::bst_d_ordinal_t = typedef std::int16_t

CUDA 设备的序号。

◆ bst_feature_t

using xgboost::bst_feature_t = typedef std::uint32_t

数据列(特征)索引的类型。

◆ bst_float

using xgboost::bst_float = typedef float

浮点类型,用于存储统计信息。

◆ bst_group_t

using xgboost::bst_group_t = typedef std::uint32_t

排名组索引的类型。

◆ bst_idx_t

using xgboost::bst_idx_t = typedef std::uint64_t

数据行索引(样本)的类型。

◆ bst_layer_t

using xgboost::bst_layer_t = typedef std::int32_t

用于索引 boosting 层的类型。

◆ bst_node_t

using xgboost::bst_node_t = typedef std::int32_t

树节点索引的类型。

◆ bst_omp_uint

using xgboost::bst_omp_uint = typedef dmlc::omp_uint

为 openmp 循环定义无符号整型。

◆ bst_target_t

using xgboost::bst_target_t = typedef std::uint32_t

用于索引输出目标的类型。

◆ bst_tree_t

using xgboost::bst_tree_t = typedef std::int32_t

用于索引树的类型。

◆ bst_uint

using xgboost::bst_uint = typedef std::uint32_t

用于特征索引的无符号整型。

◆ bst_ulong

using xgboost::bst_ulong = typedef std::uint64_t

无符号长整型。

◆ F32Array

用于 32 位浮点数的类型化 UBJSON 数组。

◆ F64Array

用于 64 位浮点数的类型化 UBJSON 数组。

◆ GlobalConfigThreadLocalStore

using xgboost::GlobalConfigThreadLocalStore = typedef dmlc::ThreadLocalStore<GlobalConfiguration>

◆ GradientPair

梯度提升中通常需要的梯度统计对。

◆ GradientPairPrecise

高精度梯度统计对。

◆ I16Array

用于 int16_t 的类型化 UBJSON 数组。

◆ I32Array

用于 int32_t 的类型化 UBJSON 数组。

◆ I64Array

用于 int64_t 的类型化 UBJSON 数组。

◆ I8Array

用于 int8_t 的类型化 UBJSON 数组。

◆ Integer

using xgboost::Integer = typedef JsonInteger

◆ Null

using xgboost::Null = typedef JsonNull

◆ Number

using xgboost::Number = typedef JsonNumber

◆ Object

using xgboost::Object = typedef JsonObject

◆ omp_ulong

using xgboost::omp_ulong = typedef dmlc::omp_ulong

为 openmp 循环定义无符号长整型。

◆ String

using xgboost::String = typedef JsonString

◆ U8Array

用于 uint8_t 的类型化 UBJSON 数组。

◆ XGBoostVersionT

using xgboost::XGBoostVersionT = typedef std::int32_t

用于表示二进制版本号的类型。

枚举类型文档

◆ DataSplitMode

enum xgboost::DataSplitMode : int
strong
枚举成员
kRow 
kCol 

◆ DataType

enum xgboost::DataType : uint8_t
strong

xgboost 接口接受的数据类型。

枚举成员
kFloat32 
kDouble 
kUInt32 
kUInt64 
kStr 

◆ FeatureType

enum xgboost::FeatureType : uint8_t
strong
枚举成员
kNumerical 
kCategorical 

◆ GPUAccess

控制从 GPU 的数据访问。

由于 HostDeviceVector 可以在主机和设备上都有数据,因此需要维护访问控制以保持数据一致。

支持 3 种场景:

  • 数据正在设备上被操作。GPU 具有写入权限,主机没有访问权限。
  • 数据在主机和设备上都是只读的。
  • 数据正在主机上被操作。主机具有写入权限,设备没有访问权限。
枚举成员
kNone 
kRead 
kWrite 

◆ MultiStrategy

enum xgboost::MultiStrategy : std::int32_t
strong

构建多目标模型的策略。

枚举成员
kOneOutputPerTree 
kMultiOutputTree 

◆ PredictionType

enum xgboost::PredictionType : std::uint8_t
strong
枚举成员
kValue 
kMargin 
kContribution 
kApproxContribution 
kInteraction 
kApproxInteraction 
kLeaf 

函数文档

◆ BuiltinBSwap()

template<typename T >
T xgboost::BuiltinBSwap ( v)

◆ Cast()

template<typename T , typename U >
T* xgboost::Cast ( U *  value)

◆ FromJson()

template<typename Parameter >
Args xgboost::FromJson ( Json const &  obj,
Parameter *  param 
)

从 JSON 对象加载 XGBoost 参数。

模板参数
ParameterXGBoostParameter 的实例化
参数
obj表示参数的 JSON 对象。
param输出参数。
返回
JSON 对象中的未知参数。

◆ get()

template<typename T , typename U >
auto xgboost::get ( U &  json) -> decltype(detail::GetImpl(*Cast<T>(&json.GetValue())))&

获取 Json 值。

模板参数
TJson 值类型之一。
参数
json
返回
Json 对象中包含的类型 T 的 Value。

◆ IntrusivePtrRefCount()

template<typename T >
IntrusivePtrCell& xgboost::IntrusivePtrRefCount ( T const *  ptr)
noexcept

用于返回嵌入式引用计数器的用户定义函数。

◆ IsA() [1/2]

template<typename T >
bool xgboost::IsA ( Json const &  j)

检查 Json 对象是否具有特定类型。

Json json {Array{}};
bool is_array = IsA<Array>(json);
CHECK(is_array);
JsonArray 数组
定义: json.h:605

◆ IsA() [2/2]

template<typename T >
bool xgboost::IsA ( Value const *  value)

◆ MTNotImplemented()

StringView xgboost::MTNotImplemented ( )
inline

◆ operator!=() [1/4]

template<class T , class U >
bool xgboost::operator!= ( IntrusivePtr< T > const &  x,
IntrusivePtr< U > const &  y 
)
noexcept

◆ operator!=() [2/4]

template<class T , class U >
bool xgboost::operator!= ( IntrusivePtr< T > const &  x,
U *  y 
)
noexcept

◆ operator!=() [3/4]

bool xgboost::operator!= ( StringView  l,
StringView  r 
)
inline

◆ operator!=() [4/4]

template<class T , class U >
bool xgboost::operator!= ( T *  x,
IntrusivePtr< U > const &  y 
)
noexcept

◆ operator<() [1/4]

template<class T >
bool xgboost::operator< ( IntrusivePtr< T > const &  x,
IntrusivePtr< T > const &  y 
)
noexcept

◆ operator<() [2/4]

bool xgboost::operator< ( std::string const &  l,
StringView  r 
)
inline

◆ operator<() [3/4]

bool xgboost::operator< ( StringView  l,
std::string const &  r 
)
inline

◆ operator<() [4/4]

bool xgboost::operator< ( StringView  l,
StringView  r 
)
inline

◆ operator<<() [1/3]

template<class E , class T , class Y >
std::basic_ostream<E, T>& xgboost::operator<< ( std::basic_ostream< E, T > &  os,
IntrusivePtr< Y > const &  p 
)

◆ operator<<() [2/3]

std::ostream& xgboost::operator<< ( std::ostream &  os,
DeviceOrd  ord 
)

◆ operator<<() [3/3]

std::ostream& xgboost::operator<< ( std::ostream &  os,
StringView const  v 
)
inline

◆ operator<=()

template<class T >
bool xgboost::operator<= ( IntrusivePtr< T > const &  x,
IntrusivePtr< T > const &  y 
)
noexcept

◆ operator==() [1/4]

template<class T , class U >
bool xgboost::operator== ( IntrusivePtr< T > const &  x,
IntrusivePtr< U > const &  y 
)
noexcept

◆ operator==() [2/4]

template<class T , class U >
bool xgboost::operator== ( IntrusivePtr< T > const &  x,
U *  y 
)
noexcept

◆ operator==() [3/4]

bool xgboost::operator== ( StringView  l,
StringView  r 
)
inline

◆ operator==() [4/4]

template<class T , class U >
bool xgboost::operator== ( T *  x,
IntrusivePtr< U > const &  y 
)
noexcept

◆ operator>()

template<class T >
bool xgboost::operator> ( IntrusivePtr< T > const &  x,
IntrusivePtr< T > const &  y 
)
noexcept

◆ operator>=()

template<class T >
bool xgboost::operator>= ( IntrusivePtr< T > const &  x,
IntrusivePtr< T > const &  y 
)
noexcept

◆ ToBigEndian()

template<typename T , std::enable_if_t< sizeof(T)==1 > * = nullptr>
T xgboost::ToBigEndian ( v)
inline

template<typename T , std::enable_if_t< sizeof(T)==1 > * = nullptr>

template<typename Parameter >
Object xgboost::ToJson ( Parameter const &  param)

将 XGBoost 参数转换为 JSON 对象。

模板参数
ParameterXGBoostParameter 的实例化
参数
param输入参数
返回
表示输入参数的 JSON 对象

变量文档

◆ kRtEps

constexpr bst_float xgboost::kRtEps = 1e-6f
constexpr

用于最小拆分决策的小 eps 间隔。