treelite
|
Functions | |
int | TreeliteGetHeaderField (TreeliteModelHandle model, char const *name, TreelitePyBufferFrame *out_frame) |
Get a field in the header. More... | |
int | TreeliteGetTreeField (TreeliteModelHandle model, uint64_t tree_id, char const *name, TreelitePyBufferFrame *out_frame) |
Get a field in a tree. More... | |
int | TreeliteSetHeaderField (TreeliteModelHandle model, char const *name, TreelitePyBufferFrame frame) |
Set a field in the header. More... | |
int | TreeliteSetTreeField (TreeliteModelHandle model, uint64_t tree_id, char const *name, TreelitePyBufferFrame frame) |
Set a field in a tree. More... | |
The getter and setter methods are useful for modifying a tree model in-place. This interface should be used by an expert user, as the interface performs no validation for the setter.
int TreeliteGetHeaderField | ( | TreeliteModelHandle | model, |
char const * | name, | ||
TreelitePyBufferFrame * | out_frame | ||
) |
Get a field in the header.
This function returns the requested field using the Python buffer protocol (PEP 3118).
model | Treelite Model object |
name | Name of the field |
out_frame | Buffer frame representing the requested field |
int TreeliteGetTreeField | ( | TreeliteModelHandle | model, |
uint64_t | tree_id, | ||
char const * | name, | ||
TreelitePyBufferFrame * | out_frame | ||
) |
Get a field in a tree.
This function returns the requested field using the Python buffer protocol (PEP 3118).
model | Treelite Model object |
tree_id | ID of the tree |
name | Name of the field |
out_frame | Buffer frame representing the requested field |
int TreeliteSetHeaderField | ( | TreeliteModelHandle | model, |
char const * | name, | ||
TreelitePyBufferFrame | frame | ||
) |
Set a field in the header.
This function accepts the field's new value using the Python buffer protocol (PEP 3118).
model | Treelite Model object |
name | Name of the field |
frame | Buffer frame representing the new value for the field |
int TreeliteSetTreeField | ( | TreeliteModelHandle | model, |
uint64_t | tree_id, | ||
char const * | name, | ||
TreelitePyBufferFrame | frame | ||
) |
Set a field in a tree.
This function accepts the field's new value using the Python buffer protocol (PEP 3118).
model | Treelite Model object |
tree_id | ID of the tree |
name | Name of the field |
frame | Buffer frame representing the new value for the field |