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

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

#include <data.h>

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

公共类型

使用 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 >
bst_idx_t Push (AdapterBatchT const &batch, float missing, std::int32_t nthread)
 将外部数据批次推送到此页面。 更多...
 
void Push (const SparsePage &batch)
 推送稀疏页面。 更多...
 
void PushCSC (const SparsePage &batch)
 推送以 CSC 格式存储的 SparsePage更多...
 

公共属性

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

详细描述

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

成员类型定义文档

◆ Inst

批处理中的稀疏向量实例

构造函数和析构函数文档

◆ SparsePage() [1/3]

xgboost::SparsePage::SparsePage ( )
inline

构造函数

◆ SparsePage() [2/3]

xgboost::SparsePage::SparsePage ( SparsePage const &  that)
删除

◆ SparsePage() [3/3]

xgboost::SparsePage::SparsePage ( SparsePage &&  that)
默认

◆ ~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)
默认

◆ operator=() [2/2]

SparsePage& xgboost::SparsePage::operator= ( SparsePage const &  that)
删除

◆ Push() [1/2]

template<typename AdapterBatchT >
bst_idx_t xgboost::SparsePage::Push ( AdapterBatchT const &  批处理,
float  missing,
std::int32_t  nthread 
)

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

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

◆ Push() [2/2]

void xgboost::SparsePage::Push ( const SparsePage 批处理)

推送稀疏页面。

参数
批处理行页面

◆ PushCSC()

void xgboost::SparsePage::PushCSC ( const SparsePage 批处理)

推送以 CSC 格式存储的 SparsePage

参数
批处理要推送的行批处理

◆ 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

此类的文档由以下文件生成