xgboost
Classes | Public Member Functions | List of all members
xgboost::RegTree::FVec Struct Reference

dense feature vector that can be taken by RegTree and can be construct from sparse feature vector. More...

#include <tree_model.h>

Collaboration diagram for xgboost::RegTree::FVec:
Collaboration graph

Public Member Functions

void Init (size_t size)
 initialize the vector with size vector More...
 
void Fill (const SparsePage::Inst &inst)
 fill the vector with sparse vector More...
 
void Drop ()
 drop the trace after fill, must be called after fill. More...
 
size_t Size () const
 returns the size of the feature vector More...
 
bst_float GetFvalue (size_t i) const
 get ith value More...
 
bool IsMissing (size_t i) const
 check whether i-th entry is missing More...
 
bool HasMissing () const
 

Detailed Description

dense feature vector that can be taken by RegTree and can be construct from sparse feature vector.

Member Function Documentation

◆ Drop()

void xgboost::RegTree::FVec::Drop ( )
inline

drop the trace after fill, must be called after fill.

Parameters
instThe sparse instance to drop.

◆ Fill()

void xgboost::RegTree::FVec::Fill ( const SparsePage::Inst inst)
inline

fill the vector with sparse vector

Parameters
instThe sparse instance to fill.

◆ GetFvalue()

bst_float xgboost::RegTree::FVec::GetFvalue ( size_t  i) const
inline

get ith value

Parameters
ifeature index.
Returns
the i-th feature value

◆ HasMissing()

bool xgboost::RegTree::FVec::HasMissing ( ) const
inline

◆ Init()

void xgboost::RegTree::FVec::Init ( size_t  size)
inline

initialize the vector with size vector

Parameters
sizeThe size of the feature vector.

◆ IsMissing()

bool xgboost::RegTree::FVec::IsMissing ( size_t  i) const
inline

check whether i-th entry is missing

Parameters
ifeature index.
Returns
whether i-th value is missing.

◆ Size()

size_t xgboost::RegTree::FVec::Size ( ) const
inline

returns the size of the feature vector

Returns
the size of the feature vector

The documentation for this struct was generated from the following file: