| xgboost | 
Learner 接口,它将目标、gbm 和评估集成在一起。这是面向用户的 XGBoost 训练模块。更多...
| 命名空间 | |
| collective | |
| common | |
| 详细信息 | |
| gbm | |
| linalg | |
| 系统 | |
| 树 | |
| 类 | |
| 类 | GradientPairInt64 | 
| 用于高精度梯度对的定点表示。具有不同的接口,因此我们不会在增益计算中意外使用它。更多... | |
| 类 | DMatrixCache | 
| DMatrix 相关数据的线程感知 FIFO 缓存。更多... | |
| 结构 | DeviceSym | 
| 结构 | DeviceOrd | 
| 设备序号的类型。该类型被打包成 32 位,以便在查看像 linalg::TensorView这样的类型时高效使用。 更多... | |
| 结构 | Context | 
| XGBoost 的运行时上下文。包含线程和设备等信息。 更多... | |
| 类 | MetaInfo | 
| 关于数据集的元信息,始终驻留在内存中。 更多... | |
| 结构 | Entry | 
| 稀疏向量中的元素。 更多... | |
| 结构 | BatchParam | 
| 用于构建直方图索引批次的参数。 更多... | |
| 结构 | HostSparsePageView | 
| 类 | SparsePage | 
| 稀疏批次的内存存储单元,以 CSR 格式存储。 更多... | |
| 类 | CSCPage | 
| 类 | ExtSparsePage | 
| 用于导出 DMatrix 的稀疏页面。与 SparsePage 相同,只是类型不同,以防止在内部使用。 更多... | |
| 类 | SortedCSCPage | 
| 类 | BatchIteratorImpl | 
| 类 | BatchIterator | 
| 类 | BatchSet | 
| 结构 | ExtMemConfig | 
| 类 | DMatrix | 
| XGBoost 内部使用的数据结构,用于保存所有外部数据。更多... | |
| 类 | 特征映射 (FeatureMap) | 
| 特征映射数据结构,用于帮助文本模型转储。TODO(tqchen) 考虑使其更加轻量化。更多... | |
| 类 | GradientBooster | 
| 梯度提升模型的接口。 更多... | |
| 结构 | GradientBoosterReg | 
| 树更新器的注册表条目。 更多... | |
| 结构 | GlobalConfiguration | 
| 结构 | InitNewThread | 
| 结构 | HostDeviceVectorImpl | 
| 类 | HostDeviceVector | 
| 类 | IntrusivePtrCell | 
| 用于将引用计数嵌入客户端对象的辅助类。有关内存顺序的讨论,请参阅 https://boost.ac.cn/doc/libs/1_74_0/doc/html/atomic/usage_examples.html。更多... | |
| 类 | IntrusivePtr | 
| 侵入式指针的实现。一个智能指针,指向一个嵌入了引用计数器的对象。底层对象必须实现一个友元函数IntrusivePtrRefCount(),该函数返回引用计数器(类型为IntrusivePtrCell)。侵入式指针比std::shared_ptr<>更快:std::shared_ptr<>为引用计数器进行了额外的内存分配,而侵入式指针则没有。更多... | |
| 类 | 值 | 
| 类 | JsonString | 
| 类 | JsonArray | 
| 类 | JsonTypedArray | 
| 用于通用二进制 JSON 的类型化数组。更多... | |
| 类 | JsonObject | 
| 类 | JsonNumber | 
| 类 | JsonInteger | 
| 类 | JsonNull | 
| 类 | JsonBoolean | 
| 描述真和假。更多... | |
| 类 | Json | 
| 表示 JSON 格式的数据结构。更多... | |
| 类 | JsonReader | 
| 一个 JSON 读取器,目前错误检查和 UTF-8 尚未完全支持。更多... | |
| 类 | JsonWriter | 
| 类 | UBJReader | 
| UBJSON 的读取器 https://ubjson.org/。更多... | |
| 类 | UBJWriter | 
| UBJSON 的写入器 https://ubjson.org/。更多... | |
| 类 | 学习器 | 
| Learner 类,用于执行训练和预测。这是xgboost训练的用户界面模块。Load/Save 函数对应于 Python/R 中使用的模型。更多... | |
| 结构 | LearnerModelParam | 
| 基本的模型参数,用于描述助推器。更多... | |
| 类 | LinearUpdater | 
| 线性更新器的接口 更多... | |
| 结构 | LinearUpdaterReg | 
| 线性更新器的注册条目。 更多... | |
| 类 | Metric | 
| 用于评估模型性能的评估指标接口。这与训练无关,仅用于评估目的。更多... | |
| 结构 | MetricReg | 
| 用于 Metric 工厂函数的注册表条目。附加参数 const char* param 给出 @ 后的值,可以为 null。例如,metric map@3,则:param == "3"。 更多... | |
| 结构 | 模型 | 
| 结构 | 可配置 | 
| 结构 | MultiTargetTreeView | 
| 适用于主机和设备的 @MultiTargetTree 的视图。 更多... | |
| 类 | MultiTargetTree | 
| 多目标模型的树结构。更多... | |
| 类 | ObjFunction | 
| 目标函数的接口。 更多... | |
| 结构 | ObjFunctionReg | 
| 目标工厂函数的注册表条目。 更多... | |
| 结构 | XGBoostParameter | 
| 结构 | PredictionCacheEntry | 
| 包含指向输入矩阵和关联的缓存预测的指针。更多... | |
| 类 | PredictionContainer | 
| 用于管理预测缓存的容器。更多... | |
| 类 | 预测器 | 
| 对 GBTree 的单个训练实例或批量实例执行预测。所有预测函数都将 GBTreeModel 和 DMatrix 作为输入,并输出预测向量。预测器不修改模型本身的任何状态。更多... | |
| 结构 | PredictorReg | 
| 预测器注册表条目。更多... | |
| 结构 | StringView | 
| 结构 | ObjInfo | 
| 由目标函数返回的一个结构体,用于确定当前任务。该结构体尚未被任何算法使用,仅用于未来开发,例如分类拆分。更多信息... | |
| 结构 | TreeParam | 
| 树的元参数。更多... | |
| 结构 | RTreeNodeStat | 
| 回归树中使用的节点统计信息。更多... | |
| 类 | CopyUniquePtr | 
| 用于定义包含唯一指针的可复制数据结构的助手。更多... | |
| 类 | RegTree | 
| 定义回归树为最常见的树模型。更多... | |
| 类 | TreeUpdater | 
| 树更新模块的接口,用于执行树的更新。更多... | |
| 结构 | TreeUpdaterReg | 
| 树更新器注册表条目。更多... | |
| 类型定义 | |
| 使用 | bst_uint = std::uint32_t | 
| 用于特征索引的无符号整数类型。更多... | |
| 使用 | bst_ulong = std::uint64_t | 
| 无符号长整数。更多... | |
| 使用 | bst_float = float | 
| 浮点类型,用于存储统计信息。更多... | |
| 使用 | bst_cat_t = std::int32_t | 
| 分类值类型。更多... | |
| 使用 | bst_feature_t = std::uint32_t | 
| 数据列(特征)索引的类型。更多... | |
| 使用 | bst_bin_t = std::int32_t | 
| 直方图 bin 索引的类型。我们有时使用 -1 表示无效 bin。更多... | |
| 使用 | bst_idx_t = std::uint64_t | 
| 数据行索引(样本)的类型。更多... | |
| 使用 | bst_node_t = std::int32_t | 
| 树节点索引的类型。更多... | |
| 使用 | bst_group_t = std::uint32_t | 
| 排名组索引的类型。更多... | |
| 使用 | bst_target_t = std::uint32_t | 
| 用于索引输出目标的类型。更多... | |
| 使用 | bst_layer_t = std::int32_t | 
| 用于索引增强层的类型。更多... | |
| 使用 | bst_tree_t = std::int32_t | 
| 用于索引树的类型。更多... | |
| 使用 | bst_d_ordinal_t = std::int16_t | 
| CUDA 设备的序号。更多... | |
| 使用 | GradientPair = detail::GradientPairInternal< float > | 
| 梯度提升中通常需要的梯度统计对。更多... | |
| 使用 | GradientPairPrecise = detail::GradientPairInternal< double > | 
| 高精度梯度统计对。更多... | |
| 使用 | Args = std::vector< std::pair< std::string, std::string > > | 
| 使用 | omp_ulong = dmlc::omp_ulong | 
| 为 openmp 循环定义无符号长整型。更多... | |
| 使用 | bst_omp_uint = dmlc::omp_uint | 
| 为 openmp 循环定义无符号整型。更多... | |
| 使用 | XGBoostVersionT = std::int32_t | 
| 用于表示二进制形式的版本号的类型。更多... | |
| 使用 | GlobalConfigThreadLocalStore = dmlc::ThreadLocalStore< GlobalConfiguration > | 
| 使用 | F32Array = JsonTypedArray< float, Value::ValueKind::kF32Array > | 
| 用于 32 位浮点数的类型化 UBJSON 数组。更多... | |
| 使用 | F64Array = JsonTypedArray< double, Value::ValueKind::kF64Array > | 
| 用于 64 位浮点数的类型化 UBJSON 数组。更多... | |
| 使用 | I8Array = JsonTypedArray< std::int8_t, Value::ValueKind::kI8Array > | 
| 用于 int8_t 的类型化 UBJSON 数组。更多... | |
| 使用 | U8Array = JsonTypedArray< std::uint8_t, Value::ValueKind::kU8Array > | 
| 用于 uint8_t 的类型化 UBJSON 数组。更多... | |
| 使用 | I16Array = JsonTypedArray< std::int16_t, Value::ValueKind::kI16Array > | 
| 用于 int16_t 的类型化 UBJSON 数组。更多... | |
| 使用 | U16Array = JsonTypedArray< std::uint16_t, Value::ValueKind::kU16Array > | 
| 用于 uint16_t 的类型化 UBJSON 数组。更多... | |
| 使用 | I32Array = JsonTypedArray< std::int32_t, Value::ValueKind::kI32Array > | 
| 用于 int32_t 的类型化 UBJSON 数组。更多... | |
| 使用 | U32Array = JsonTypedArray< std::uint32_t, Value::ValueKind::kU32Array > | 
| 用于 uint32_t 的类型化 UBJSON 数组。更多... | |
| 使用 | I64Array = JsonTypedArray< std::int64_t, Value::ValueKind::kI64Array > | 
| 用于 int64_t 的类型化 UBJSON 数组。更多... | |
| 使用 | U64Array = JsonTypedArray< std::uint64_t, Value::ValueKind::kU64Array > | 
| 用于 uint64_t 的类型化 UBJSON 数组。更多... | |
| 使用 | Object = JsonObject | 
| 使用 | Array = JsonArray | 
| 使用 | Number = JsonNumber | 
| 使用 | Integer = JsonInteger | 
| 使用 | Boolean = JsonBoolean | 
| 使用 | String = JsonString | 
| 使用 | Null = JsonNull | 
| 枚举 | |
| 枚举类 | DataType : uint8_t { kFloat32 = 1 , kDouble = 2 , kUInt32 = 3 , kUInt64 = 4 , kStr = 5 } | 
| xgboost 接口接受的数据类型。更多... | |
| 枚举类 | FeatureType : uint8_t { kNumerical = 0 , kCategorical = 1 } | 
| 枚举类 | DataSplitMode : int { kRow = 0 , kCol = 1 } | 
| 枚举 | GPUAccess { kNone , kRead , kWrite } | 
| 控制从 GPU 访问数据。更多... | |
| 枚举类 | PredictionType : std::uint8_t { kValue = 0 , kMargin = 1 , kContribution = 2 , kApproxContribution = 3 , kInteraction = 4 , kApproxInteraction = 5 , kLeaf = 6 } | 
| 枚举类 | MultiStrategy : std::int32_t { kOneOutputPerTree = 0 , kMultiOutputTree = 1 } | 
| 构建多目标模型的策略。更多... | |
| 函数 | |
| std::ostream & | operator<< (std::ostream &os, DeviceOrd ord) | 
| template<typename T > | |
| IntrusivePtrCell & | IntrusivePtrRefCount (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 ¶m) | 
| 将 XGBoost 参数转换为 JSON 对象。更多... | |
| template<typename Parameter > | |
| Args | FromJson (Json const &obj, Parameter *param) | 
| 从 JSON 对象加载 XGBoost 参数。更多... | |
| template<typename T > | |
| T | BuiltinBSwap (T v) | 
| template<typename T , std::enable_if_t< sizeof(T)==1 > * = nullptr> | |
| T | 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 间隙。更多... | |
Learner 接口,将目标、gbm 和评估整合在一起。这是用户界面 XGBoost 训练模块。
树的模型结构
xgboost 使用的目标函数接口。
多目标树的核心数据结构。
Copyright 2023 by XGBoost contributors
Copyright 2019-2025, XGBoost Contributors
Copyright 2019-2024, XGBoost Contributors
版权所有 2015-2025, XGBoost 贡献者
Copyright 2023-2025, XGBoost contributors
Copyright 2014-2025, XGBoost Contributors
Copyright 2021-2023, XGBoost Contributors
Copyright 2021-2024, XGBoost Contributors
Copyright 2014-2025, XGBoost Contributors
| using xgboost::Args = typedef std::vector<std::pair<std::string, std::string> > | 
| using xgboost::Array = typedef JsonArray | 
| using xgboost::Boolean = typedef JsonBoolean | 
| using xgboost::bst_bin_t = typedef std::int32_t | 
直方图 bin 索引的类型。我们有时使用 -1 表示无效 bin。
| using xgboost::bst_cat_t = typedef std::int32_t | 
分类值类型。
| using xgboost::bst_d_ordinal_t = typedef std::int16_t | 
CUDA 设备的序号。
| using xgboost::bst_feature_t = typedef std::uint32_t | 
数据列(特征)索引的类型。
| using xgboost::bst_float = typedef float | 
浮点类型,用于存储统计信息
| using xgboost::bst_group_t = typedef std::uint32_t | 
排名组索引的类型。
| using xgboost::bst_idx_t = typedef std::uint64_t | 
数据行索引(样本)的类型。
| using xgboost::bst_layer_t = typedef std::int32_t | 
用于索引提升层的类型。
| using xgboost::bst_node_t = typedef std::int32_t | 
树节点索引的类型。
| using xgboost::bst_omp_uint = typedef dmlc::omp_uint | 
为 openmp 循环定义无符号整型
| using xgboost::bst_target_t = typedef std::uint32_t | 
用于索引输出目标的类型。
| using xgboost::bst_tree_t = typedef std::int32_t | 
用于索引树的类型。
| using xgboost::bst_uint = typedef std::uint32_t | 
用于特征索引的无符号整数类型。
| using xgboost::bst_ulong = typedef std::uint64_t | 
无符号长整数
| using xgboost::F32Array = typedef JsonTypedArray<float, Value::ValueKind::kF32Array> | 
用于 32 位浮点数的类型化 UBJSON 数组。
| using xgboost::F64Array = typedef JsonTypedArray<double, Value::ValueKind::kF64Array> | 
用于 64 位浮点数的类型化 UBJSON 数组。
| using xgboost::GlobalConfigThreadLocalStore = typedef dmlc::ThreadLocalStore<GlobalConfiguration> | 
| using xgboost::GradientPair = typedef detail::GradientPairInternal<float> | 
梯度提升中通常需要的梯度统计对
| using xgboost::GradientPairPrecise = typedef detail::GradientPairInternal<double> | 
高精度梯度统计对。
| using xgboost::I16Array = typedef JsonTypedArray<std::int16_t, Value::ValueKind::kI16Array> | 
用于 int16_t 的类型化 UBJSON 数组。
| using xgboost::I32Array = typedef JsonTypedArray<std::int32_t, Value::ValueKind::kI32Array> | 
用于 int32_t 的类型化 UBJSON 数组。
| using xgboost::I64Array = typedef JsonTypedArray<std::int64_t, Value::ValueKind::kI64Array> | 
用于 int64_t 的类型化 UBJSON 数组。
| using xgboost::I8Array = typedef JsonTypedArray<std::int8_t, Value::ValueKind::kI8Array> | 
用于 int8_t 的类型化 UBJSON 数组。
| using xgboost::Integer = typedef JsonInteger | 
| using xgboost::Null = typedef JsonNull | 
| using xgboost::Number = typedef JsonNumber | 
| using xgboost::Object = typedef JsonObject | 
| using xgboost::omp_ulong = typedef dmlc::omp_ulong | 
为 openmp 循环定义无符号长整型
| using xgboost::String = typedef JsonString | 
| using xgboost::U16Array = typedef JsonTypedArray<std::uint16_t, Value::ValueKind::kU16Array> | 
用于 uint16_t 的类型化 UBJSON 数组。
| using xgboost::U32Array = typedef JsonTypedArray<std::uint32_t, Value::ValueKind::kU32Array> | 
用于 uint32_t 的类型化 UBJSON 数组。
| using xgboost::U64Array = typedef JsonTypedArray<std::uint64_t, Value::ValueKind::kU64Array> | 
用于 uint64_t 的类型化 UBJSON 数组。
| using xgboost::U8Array = typedef JsonTypedArray<std::uint8_t, Value::ValueKind::kU8Array> | 
用于 uint8_t 的类型化 UBJSON 数组。
| using xgboost::XGBoostVersionT = typedef std::int32_t | 
用于表示二进制形式的版本号的类型。
| 
 | 强 | 
| 
 | 强 | 
| 
 | 强 | 
| enum xgboost::GPUAccess | 
控制从 GPU 访问数据。
由于 HostDeviceVector 可以同时在主机和设备上拥有数据,因此需要维护访问控制以保持数据一致。
支持 3 种场景
| 枚举器 | |
|---|---|
| kNone | |
| kRead | |
| kWrite | |
| 
 | 强 | 
| 
 | 强 | 
| T xgboost::BuiltinBSwap | ( | T | v | ) | 
| T* xgboost::Cast | ( | U * | value | ) | 
从 JSON 对象加载 XGBoost 参数。
| 参数 | XGBoostParameter 的实例化 | 
| obj | 表示参数的 JSON 对象。 | 
| param | 输出参数。 | 
| auto xgboost::get | ( | U & | json | ) | -> decltype(detail::GetImpl(*Cast<T>(&json.GetValue())))& | 
| 
 | noexcept | 
用于返回嵌入式引用计数的自定义函数。
| bool xgboost::IsA | ( | Json const & | j | ) | 
| bool xgboost::IsA | ( | Value const * | value | ) | 
| 
 | inline | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | inline | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| std::basic_ostream<E, T>& xgboost::operator<< | ( | std::basic_ostream< E, T > & | os, | 
| IntrusivePtr< Y > const & | p | ||
| ) | 
| std::ostream& xgboost::operator<< | ( | std::ostream & | os, | 
| DeviceOrd | ord | ||
| ) | 
| 
 | inline | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | inline | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | inline | 
| Object xgboost::ToJson | ( | Parameter const & | param | ) | 
| 
 | constexpr | 
最小分割决策的小 eps 间隙。