xgboost

Public Types | Public Member Functions | List of all members
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>`

Collaboration diagram for xgboost::FeatureMap:

## Public Types
enum | Type { kIndicator = 0, kQuantitive = 1, kInteger = 2, kFloat = 3 }
| type of feature maps More...

## Public Member Functions
void | LoadText (std::istream &is)
| load feature map from input stream More...
void | PushBack (int fid, const char *fname, const char *ftype)
| push back feature map. More...
void | Clear ()
| clear the feature map More...
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 Enumeration Documentation

## ◆ Type

enum xgboost::FeatureMap::Type

type of feature maps

Enumerator
kIndicator |
kQuantitive |
kInteger |
kFloat |

## Member Function Documentation

## ◆ Clear()

void xgboost::FeatureMap::Clear | ( |  | ) |
| inline

clear the feature map

## ◆ LoadText()

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

load feature map from input stream

Parameters

  is | Input 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

  fid | The feature index.
  fname | The feature name.
  ftype | The 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:

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