tabular_trees.BoosterHeader
- class tabular_trees.BoosterHeader(header, version, num_class, num_tree_per_iteration, label_index, max_feature_idx, objective, feature_names, feature_infos, tree_sizes)[source]
Bases:
objectDataclass for the metadata in header section of a Booster.
- __init__(header, version, num_class, num_tree_per_iteration, label_index, max_feature_idx, objective, feature_names, feature_infos, tree_sizes)
Methods
__init__(header, version, num_class, ...)Append the booster header as a list of strings.
Concatenate header information to a single string.
Attributes
headerMajor version of the LightGBM package.
Number of (response) classes.
num_tree_per_iterationlabel_indexNumber of features.
Objective for the model.
Name of each feature.
Range of each feature.
Number of characters for each tree.
- feature_infos
Range of each feature.
- feature_names
Name of each feature.
- get_booster_string_rows()[source]
Append the booster header as a list of strings.
- Returns:
header – Header information as a list of strings.
- Return type:
list[str]
- max_feature_idx
Number of features.
- num_class
Number of (response) classes.
- objective
Objective for the model.
- to_string()[source]
Concatenate header information to a single string.
- Returns:
header – Header information concatenated into one string.
- Return type:
str
- tree_sizes
Number of characters for each tree.
This is equal to len(BoosterTree.get_booster_sting()) + 1 for each tree in the model.
- version
Major version of the LightGBM package.