tabular_trees.EditableBooster

class tabular_trees.EditableBooster(header, trees, bottom_rows)[source]

Bases: object

Editable LightGBM booster.

__init__(header, trees, bottom_rows)

Methods

__init__(header, trees, bottom_rows)

from_booster(booster)

Create an EditableBooster from a LightGBM Booster.

to_booster()

Convert EditableBooster to LightGBM Booster.

to_booster_string()

Convert EditableBooster to BoosterString.

Attributes

header

Header section for the Booster.

trees

List of trees in the Booster.

bottom_rows

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:

EditableBooster

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:

BoosterString

trees

List of trees in the Booster.