Using to store data and providing some operations on one feature group.
More...
#include <feature_group.h>
|
| FeatureGroup (int num_feature, std::vector< std::unique_ptr< BinMapper > > &bin_mappers, data_size_t num_data, double sparse_threshold, bool is_enable_sparse) |
| Constructor.
|
|
| FeatureGroup (int num_feature, std::vector< std::unique_ptr< BinMapper > > &bin_mappers, data_size_t num_data, bool is_sparse) |
|
| FeatureGroup (const void *memory, data_size_t num_all_data, const std::vector< data_size_t > &local_used_indices) |
| Constructor from memory.
|
|
| ~FeatureGroup () |
| Destructor.
|
|
void | PushData (int tid, int sub_feature_idx, data_size_t line_idx, double value) |
| Push one record, will auto convert to bin and push to bin data.
|
|
void | CopySubset (const FeatureGroup *full_feature, const data_size_t *used_indices, data_size_t num_used_indices) |
|
BinIterator * | SubFeatureIterator (int sub_feature) |
|
BinIterator * | FeatureGroupIterator () |
| Returns a BinIterator that can access the entire feature group's raw data. The RawGet() function of the iterator should be called for best efficiency.
|
|
data_size_t | Split (int sub_feature, const uint32_t *threshold, int num_threshold, bool default_left, data_size_t *data_indices, data_size_t num_data, data_size_t *lte_indices, data_size_t *gt_indices) const |
|
double | BinToValue (int sub_feature_idx, uint32_t bin) const |
| From bin to feature value.
|
|
void | SaveBinaryToFile (const VirtualFileWriter *writer) const |
| Save binary data to file.
|
|
size_t | SizesInByte () const |
| Get sizes in byte of this object.
|
|
FeatureGroup & | operator= (const FeatureGroup &)=delete |
| Disable copy.
|
|
| FeatureGroup (const FeatureGroup &)=delete |
| Disable copy.
|
|
|
friend | Dataset |
|
friend | DatasetLoader |
|
Using to store data and providing some operations on one feature group.
◆ FeatureGroup() [1/2]
LightGBM::FeatureGroup::FeatureGroup |
( |
int |
num_feature, |
|
|
std::vector< std::unique_ptr< BinMapper > > & |
bin_mappers, |
|
|
data_size_t |
num_data, |
|
|
double |
sparse_threshold, |
|
|
bool |
is_enable_sparse |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
num_feature | number of features of this group |
bin_mappers | Bin mapper for features |
num_data | Total number of data |
is_enable_sparse | True if enable sparse feature |
sparse_threshold | Threshold for treating a feature as a sparse feature |
◆ FeatureGroup() [2/2]
LightGBM::FeatureGroup::FeatureGroup |
( |
const void * |
memory, |
|
|
data_size_t |
num_all_data, |
|
|
const std::vector< data_size_t > & |
local_used_indices |
|
) |
| |
|
inline |
Constructor from memory.
- Parameters
-
memory | Pointer of memory |
num_all_data | Number of global data |
local_used_indices | Local used indices, empty means using all data |
◆ BinToValue()
double LightGBM::FeatureGroup::BinToValue |
( |
int |
sub_feature_idx, |
|
|
uint32_t |
bin |
|
) |
| const |
|
inline |
From bin to feature value.
- Parameters
-
- Returns
- FeatureGroup value of this bin
◆ FeatureGroupIterator()
BinIterator * LightGBM::FeatureGroup::FeatureGroupIterator |
( |
| ) |
|
|
inline |
Returns a BinIterator that can access the entire feature group's raw data. The RawGet() function of the iterator should be called for best efficiency.
- Returns
- A pointer to the BinIterator object
◆ PushData()
void LightGBM::FeatureGroup::PushData |
( |
int |
tid, |
|
|
int |
sub_feature_idx, |
|
|
data_size_t |
line_idx, |
|
|
double |
value |
|
) |
| |
|
inline |
Push one record, will auto convert to bin and push to bin data.
- Parameters
-
tid | Thread id |
idx | Index of record |
value | feature value of record |
◆ SaveBinaryToFile()
void LightGBM::FeatureGroup::SaveBinaryToFile |
( |
const VirtualFileWriter * |
writer | ) |
const |
|
inline |
Save binary data to file.
- Parameters
-
The documentation for this class was generated from the following file: