API of Treelite Python package.
treelite.frontend
treelite.sklearn
treelite.model_builder
treelite.ModelBuilder
treelite.Model
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