Medial Code Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions
xgboost::FeatureMap Class Reference

Feature map data structure to help text model dump. TODO(tqchen) consider make it even more lightweight. More...

#include <feature_map.h>

Public Types

enum  Type {
  kIndicator = 0 , kQuantitive = 1 , kInteger = 2 , kFloat = 3 ,
  kCategorical = 4
}
 type of feature maps
 

Public Member Functions

void LoadText (std::istream &is)
 load feature map from input stream
 
void PushBack (int fid, const char *fname, const char *ftype)
 push back feature map.
 
void Clear ()
 clear the feature map
 
size_t Size () const
 
const char * Name (size_t idx) const
 
Type TypeOf (size_t idx) const
 

Detailed Description

Feature map data structure to help text model dump. TODO(tqchen) consider make it even more lightweight.

Member Function Documentation

◆ LoadText()

void xgboost::FeatureMap::LoadText ( std::istream &  is)
inline

load feature map from input stream

Parameters
isInput text stream

◆ Name()

const char * xgboost::FeatureMap::Name ( size_t  idx) const
inline
Returns
name of specific feature

◆ PushBack()

void xgboost::FeatureMap::PushBack ( int  fid,
const char *  fname,
const char *  ftype 
)
inline

push back feature map.

Parameters
fidThe feature index.
fnameThe feature name.
ftypeThe feature type.

◆ Size()

size_t xgboost::FeatureMap::Size ( ) const
inline
Returns
number of known features

◆ TypeOf()

Type xgboost::FeatureMap::TypeOf ( size_t  idx) const
inline
Returns
type of specific feature

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