xgboost
公有类型 | 公有成员函数 | 公有属性 | 所有成员列表
xgboost::SparsePage 类参考

稀疏批次的内存存储单元,以 CSR 格式存储。更多...

#include <data.h>

xgboost::SparsePage 的继承图
Inheritance graph
xgboost::SparsePage 的协作图
Collaboration graph

公有类型

using Inst = common::Span< Entry const >
 批次中的稀疏向量实例 更多...
 

公有成员函数

HostSparsePageView GetView () const
 
 SparsePage ()
 构造函数 更多...
 
 SparsePage (SparsePage const &that)=delete
 
 SparsePage (SparsePage &&that)=default
 
SparsePageoperator= (SparsePage const &that)=delete
 
SparsePageoperator= (SparsePage &&that)=default
 
virtual ~SparsePage ()=default
 
size_t Size () const
 
size_t MemCostBytes () const
 
void Clear ()
 清空页面 更多...
 
void SetBaseRowId (size_t row_id)
 设置此页面的基础行 ID。更多...
 
SparsePage GetTranspose (int num_columns, int32_t n_threads) const
 
void SortIndices (int32_t n_threads)
 对列索引进行排序。更多...
 
bool IsIndicesSorted (int32_t n_threads) const
 检查列索引是否已排序。更多...
 
void Reindex (uint64_t feature_offset, int32_t n_threads)
 使用偏移量重新索引列索引。更多...
 
void SortRows (int32_t n_threads)
 
template<typename AdapterBatchT >
uint64_t Push (const AdapterBatchT &batch, float missing, int nthread)
 将外部数据批次推送到此页面。更多...
 
void Push (const SparsePage &batch)
 推送一个稀疏页面。更多...
 
void PushCSC (const SparsePage &batch)
 推送以 CSC 格式存储的 SparsePage更多...
 

公有属性

HostDeviceVector< bst_idx_toffset
 
HostDeviceVector< Entrydata
 段的数据 更多...
 
size_t base_rowid {0}
 

详细描述

稀疏批次的内存存储单元,以 CSR 格式存储。

成员类型定义文档

◆ Inst

批次中的稀疏向量实例

构造函数和析构函数文档

◆ SparsePage() [1/3]

xgboost::SparsePage::SparsePage ( )
inline

构造函数

◆ SparsePage() [2/3]

xgboost::SparsePage::SparsePage ( SparsePage const &  that)
delete

◆ SparsePage() [3/3]

xgboost::SparsePage::SparsePage ( SparsePage &&  that)
default

◆ ~SparsePage()

virtual xgboost::SparsePage::~SparsePage ( )
virtualdefault

成员函数文档

◆ Clear()

void xgboost::SparsePage::Clear ( )
inline

清空页面

◆ GetTranspose()

SparsePage xgboost::SparsePage::GetTranspose ( int  num_columns,
int32_t  n_threads 
) const

◆ GetView()

HostSparsePageView xgboost::SparsePage::GetView ( ) const
inline

◆ IsIndicesSorted()

bool xgboost::SparsePage::IsIndicesSorted ( int32_t  n_threads) const

检查列索引是否已排序。

◆ MemCostBytes()

size_t xgboost::SparsePage::MemCostBytes ( ) const
inline
返回
此页面的内存成本估算

◆ operator=() [1/2]

SparsePage& xgboost::SparsePage::operator= ( SparsePage &&  that)
default

◆ operator=() [2/2]

SparsePage& xgboost::SparsePage::operator= ( SparsePage const &  that)
delete

◆ Push() [1/2]

template<typename AdapterBatchT >
uint64_t xgboost::SparsePage::Push ( const AdapterBatchT &  batch,
float  missing,
int  nthread 
)

将外部数据批次推送到此页面。

模板参数
AdapterBatchT
参数
batch
missing
nthread
返回
此输入批次中遇到的最大列数。在推送许多适配器批次以计算总列数时很有用。

◆ Push() [2/2]

void xgboost::SparsePage::Push ( const SparsePage batch)

推送一个稀疏页面。

参数
batch行页面

◆ PushCSC()

void xgboost::SparsePage::PushCSC ( const SparsePage batch)

推送以 CSC 格式存储的 SparsePage

参数
batch要推送的行批次

◆ Reindex()

void xgboost::SparsePage::Reindex ( uint64_t  feature_offset,
int32_t  n_threads 
)

使用偏移量重新索引列索引。

◆ SetBaseRowId()

void xgboost::SparsePage::SetBaseRowId ( size_t  row_id)
inline

设置此页面的基础行 ID。

◆ Size()

size_t xgboost::SparsePage::Size ( ) const
inline
返回
页面中的实例数。

◆ SortIndices()

void xgboost::SparsePage::SortIndices ( int32_t  n_threads)

对列索引进行排序。

◆ SortRows()

void xgboost::SparsePage::SortRows ( int32_t  n_threads)

成员数据文档

◆ base_rowid

size_t xgboost::SparsePage::base_rowid {0}

◆ data

HostDeviceVector<Entry> xgboost::SparsePage::data

段的数据

◆ offset

HostDeviceVector<bst_idx_t> xgboost::SparsePage::offset

此类的文档是从以下文件生成的