XGBoost 用于存储所有外部数据的内部数据结构。 更多...
#include <data.h>
|
static DMatrix * | Load (const std::string &uri, bool silent=true, DataSplitMode data_split_mode=DataSplitMode::kRow) |
| 从 URI 加载 DMatrix。 更多...
|
|
template<typename AdapterT > |
static DMatrix * | Create (AdapterT *adapter, float missing, int nthread, const std::string &cache_prefix="", DataSplitMode data_split_mode=DataSplitMode::kRow) |
| 从外部数据适配器创建新的 DMatrix。 更多...
|
|
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext > |
static DMatrix * | Create (DataIterHandle iter, DMatrixHandle proxy, std::shared_ptr< DMatrix > ref, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, float missing, std::int32_t nthread, bst_bin_t max_bin, std::int64_t max_quantile_blocks) |
| 创建一个新的基于分位数的 DMatrix,用于基于直方图的算法。 更多...
|
|
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext > |
static DMatrix * | Create (DataIterHandle iter, DMatrixHandle proxy, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, ExtMemConfig const &config) |
| 使用回调函数创建外部内存 DMatrix。 更多...
|
|
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext > |
static DMatrix * | Create (DataIterHandle iter, DMatrixHandle proxy, std::shared_ptr< DMatrix > ref, DataIterResetCallback *reset, XGDMatrixCallbackNext *next, bst_bin_t max_bin, std::int64_t max_quantile_blocks, ExtMemConfig const &config) |
| 使用回调函数创建外部内存分位数 DMatrix。 更多...
|
|
XGBoost 用于存储所有外部数据的内部数据结构。
DMatrix 类有多种变体,可以通过 Create() 方法访问。 DMatrix 本身存储预测器 X
,而包括标签和样本权重在内的其他数据则存储在 MetaInfo 类中。
◆ DMatrix()
xgboost::DMatrix::DMatrix |
( |
| ) |
|
|
default |
◆ ~DMatrix()
virtual xgboost::DMatrix::~DMatrix |
( |
| ) |
|
|
virtual |
◆ Create() [1/4]
template<typename AdapterT >
从外部数据适配器创建新的 DMatrix。
- 模板参数
-
- 参数
-
[输入, 输出] | adapter | 外部数据的视图。 |
| missing | 视为缺失值的值。 |
| nthread | 用于构建的线程数。 |
| cache_prefix | (可选) 外部内存的缓存前缀。 |
| data_split_mode | (可选) 数据分割模式。 |
- 返回值
- 创建的 DMatrix。
◆ Create() [2/4]
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext >
使用回调函数创建外部内存 DMatrix。
- 模板参数
-
DataIterHandle | 外部迭代器类型,在 C API 中定义。 |
DMatrixHandle | DMatrix 句柄,在 C API 中定义。 |
DataIterResetCallback | 重置的回调函数,原型在 C API 中定义。 |
XGDMatrixCallbackNext | next 的回调函数,原型在 C API 中定义。 |
- 参数
-
iter | 外部数据迭代器 |
proxy | ProxyDMatrix 的句柄 |
reset | 重置的回调函数 |
next | next 的回调函数 |
config | 缓存的配置。 |
- 返回值
- 创建的外部内存 DMatrix。
◆ Create() [3/4]
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext >
使用回调函数创建外部内存分位数 DMatrix。
Parameters are a combination of the external memory DMatrix and the quantile DMatrix.
- 返回值
- 创建的外部内存分位数 DMatrix。
◆ Create() [4/4]
template<typename DataIterHandle , typename DMatrixHandle , typename DataIterResetCallback , typename XGDMatrixCallbackNext >
创建一个新的基于分位数的 DMatrix,用于基于直方图的算法。
- 模板参数
-
DataIterHandle | 外部迭代器类型,在 C API 中定义。 |
DMatrixHandle | DMatrix 句柄,在 C API 中定义。 |
DataIterResetCallback | 重置的回调函数,原型在 C API 中定义。 |
XGDMatrixCallbackNext | next 的回调函数,原型在 C API 中定义。 |
- 参数
-
iter | 外部数据迭代器 |
proxy | ProxyDMatrix 的句柄 |
ref | 参考分位数 DMatrix。 |
reset | 重置的回调函数 |
next | next 的回调函数 |
missing | 应视为缺失的 值。 |
nthread | 用于初始化的线程数。 |
max_bin | 最大分箱数。 |
- 返回值
- 创建的基于分位数的 DMatrix。
◆ Ctx()
virtual Context const* xgboost::DMatrix::Ctx |
( |
| ) |
const |
|
纯虚函数 |
◆ EllpackExists()
virtual bool xgboost::DMatrix::EllpackExists |
( |
| ) |
const |
|
受保护的纯虚函数 |
◆ GetBatches() [1/6]
template<typename T >
BatchSet<T> xgboost::DMatrix::GetBatches |
( |
| ) |
|
◆ GetBatches() [2/6]
◆ GetBatches() [3/6]
◆ GetBatches() [4/6]
◆ GetBatches() [5/6]
◆ GetBatches() [6/6]
◆ GetColumnBatches()
◆ GetEllpackBatches()
◆ GetExtBatches()
◆ GetGradientIndex()
◆ GetRowBatches()
◆ GetSortedColumnBatches()
◆ GetThreadLocal()
XGBAPIThreadLocalEntry& xgboost::DMatrix::GetThreadLocal |
( |
| ) |
const |
◆ GHistIndexExists()
virtual bool xgboost::DMatrix::GHistIndexExists |
( |
| ) |
const |
|
受保护的纯虚函数 |
◆ Info() [1/2]
virtual const MetaInfo& xgboost::DMatrix::Info |
( |
| ) |
const |
|
纯虚函数 |
◆ Info() [2/2]
virtual MetaInfo& xgboost::DMatrix::Info |
( |
| ) |
|
|
纯虚函数 |
◆ IsDense()
bool xgboost::DMatrix::IsDense |
( |
| ) |
const |
|
内联 |
◆ Load()
从 URI 加载 DMatrix。
- 参数
-
uri | 输入 URI。 |
silent | 加载时是否打印信息。 |
data_split_mode | 指示数据事先是如何分割的。 |
- 返回值
- 创建的 DMatrix。
◆ NumBatches()
virtual std::int32_t xgboost::DMatrix::NumBatches |
( |
| ) |
const |
|
内联虚函数 |
◆ PageExists() [1/4]
template<typename T >
bool xgboost::DMatrix::PageExists |
( |
| ) |
const |
◆ PageExists() [2/4]
template<>
bool xgboost::DMatrix::PageExists |
( |
| ) |
const |
|
内联 |
◆ PageExists() [3/4]
template<>
bool xgboost::DMatrix::PageExists |
( |
| ) |
const |
|
内联 |
◆ PageExists() [4/4]
template<>
bool xgboost::DMatrix::PageExists |
( |
| ) |
const |
|
内联 |
◆ SetInfo()
virtual void xgboost::DMatrix::SetInfo |
( |
const char * |
key, |
|
|
std::string const & |
interface_str |
|
) |
| |
|
内联虚函数 |
◆ SingleColBlock()
bool xgboost::DMatrix::SingleColBlock |
( |
| ) |
const |
|
内联 |
◆ Slice()
◆ SliceCol()
virtual DMatrix* xgboost::DMatrix::SliceCol |
( |
int |
num_slices, |
|
|
int |
slice_id |
|
) |
| |
|
纯虚函数 |
◆ SparsePageExists()
virtual bool xgboost::DMatrix::SparsePageExists |
( |
| ) |
const |
|
受保护的纯虚函数 |
本类的文档生成自以下文件
- /home/docs/checkouts/readthedocs.org/user_builds/xgboost/checkouts/release_3.0.0/include/xgboost/data.h