Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.36 KB

treelite-api.rst

File metadata and controls

63 lines (44 loc) · 1.36 KB

Treelite API

API of Treelite Python package.

Model loaders

treelite.frontend

Scikit-learn importer

treelite.sklearn

Model builder

treelite.model_builder

Model builder (Legacy)

treelite.ModelBuilder

Model class

treelite.Model

Field accessors (Advanced)

Using field accessors, users can query and modify the value of fields in a :py~treelite.Model object. See /tutorials/edit for more details.

Note

Modifying a field is an unsafe operation

Treelite does not prevent users from assigning an invalid value to a field. Setting an invalid value may cause undefined behavior. Always consult the model spec </serialization/v4> to carefully examine model invariants and constraints on fields. For example, most tree fields must have an array of length num_nodes.

treelite.model.HeaderAccessor

treelite.model.TreeAccessor