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:

## 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 (const SparsePage::Inst &inst)
| 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 | ( | const SparsePage::Inst & | inst | ) |
| inline

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

Parameters

  inst | The sparse instance to drop.

## ◆ Fill()

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

fill the vector with sparse vector

Parameters

  inst | The sparse instance to fill.

## ◆ GetFvalue()

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

get ith value

Parameters

  i | feature 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

  size | The size of the feature vector.

## ◆ IsMissing()

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

check whether i-th entry is missing

Parameters

  i | feature 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:

- /home/runner/work/xgboost/xgboost/include/xgboost/tree_model.h