DataPartition is used to store the the partition of data on tree.
More...
#include <data_partition.hpp>
|
|
| DataPartition (data_size_t num_data, int num_leaves) |
| |
|
void | ResetLeaves (int num_leaves) |
| |
|
void | ResetNumData (int num_data) |
| |
|
void | Init () |
| | Init, will put all data on the root(leaf_idx = 0)
|
| |
|
void | ResetByLeafPred (const std::vector< int > &leaf_pred, int num_leaves) |
| |
| const data_size_t * | GetIndexOnLeaf (int leaf, data_size_t *out_len) const |
| | Get the data indices of one leaf.
|
| |
| void | Split (int leaf, const Dataset *dataset, int feature, const uint32_t *threshold, int num_threshold, bool default_left, int right_leaf) |
| | Split the data.
|
| |
| void | SetUsedDataIndices (const data_size_t *used_data_indices, data_size_t num_used_data) |
| | SetLabelAt used data indices before training, used for bagging.
|
| |
| data_size_t | leaf_count (int leaf) const |
| | Get number of data on one leaf.
|
| |
| data_size_t | leaf_begin (int leaf) const |
| | Get leaf begin.
|
| |
|
const data_size_t * | indices () const |
| |
|
int | num_leaves () const |
| | Get number of leaves.
|
| |
DataPartition is used to store the the partition of data on tree.
◆ GetIndexOnLeaf()
Get the data indices of one leaf.
- Parameters
-
| leaf | index of leaf |
| indices | output data indices |
- Returns
- number of data on this leaf
◆ leaf_begin()
| data_size_t LightGBM::DataPartition::leaf_begin |
( |
int |
leaf | ) |
const |
|
inline |
Get leaf begin.
- Parameters
-
- Returns
- begin index of this leaf
◆ leaf_count()
| data_size_t LightGBM::DataPartition::leaf_count |
( |
int |
leaf | ) |
const |
|
inline |
Get number of data on one leaf.
- Parameters
-
- Returns
- number of data of this leaf
◆ SetUsedDataIndices()
| void LightGBM::DataPartition::SetUsedDataIndices |
( |
const data_size_t * |
used_data_indices, |
|
|
data_size_t |
num_used_data |
|
) |
| |
|
inline |
SetLabelAt used data indices before training, used for bagging.
- Parameters
-
| used_data_indices | indices of used data |
| num_used_data | number of used data |
◆ Split()
| void LightGBM::DataPartition::Split |
( |
int |
leaf, |
|
|
const Dataset * |
dataset, |
|
|
int |
feature, |
|
|
const uint32_t * |
threshold, |
|
|
int |
num_threshold, |
|
|
bool |
default_left, |
|
|
int |
right_leaf |
|
) |
| |
|
inline |
Split the data.
- Parameters
-
| leaf | index of leaf |
| feature_bins | feature bin data |
| threshold | threshold that want to split |
| right_leaf | index of right leaf |
The documentation for this class was generated from the following file: