tabular_trees.EditableBooster
- class tabular_trees.EditableBooster(header, trees, bottom_rows)[source]
Bases:
objectEditable LightGBM booster.
- __init__(header, trees, bottom_rows)
Methods
__init__(header, trees, bottom_rows)from_booster(booster)Create an EditableBooster from a LightGBM Booster.
Convert EditableBooster to LightGBM Booster.
Convert EditableBooster to BoosterString.
Attributes
Header section for the Booster.
List of trees in the Booster.
Unspecified rows at the end of a Booster's string representation.
- bottom_rows
Unspecified rows at the end of a Booster’s string representation.
These are the rows after the ‘end of trees’ part of the Booster, once is has been converted to strings.
- classmethod from_booster(booster)[source]
Create an EditableBooster from a LightGBM Booster.
- Parameters:
booster (lgb.Booster) – LightGBM model to convert to EditableBooster.
- Returns:
model – Booster as an EditableBooster.
- Return type:
- header
Header section for the Booster.
- to_booster()[source]
Convert EditableBooster to LightGBM Booster.
- Returns:
model – EditableBooster as a lgb.Booster object.
- Return type:
lgb.Booster
- to_booster_string()[source]
Convert EditableBooster to BoosterString.
- Returns:
model – EditableBooster as a BoosterString object.
- Return type:
- trees
List of trees in the Booster.