Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dmlc/treelite
/ functions
Functions
686 in github.com/dmlc/treelite
⨍
Functions
686
◇
Types & classes
133
↳
Endpoints
4
↓ 74 callers
Method
PushBack
include/treelite/detail/contiguous_array.h:188
↓ 56 callers
Method
StartNode
src/model_builder/model_builder.cc:155
↓ 55 callers
Method
EndNode
src/model_builder/model_builder.cc:168
↓ 55 callers
Function
_check_call
Check the return value of C API call This function will raise exception when error occurs. Wrap every API call with this function. Param
python/treelite/core.py:62
↓ 46 callers
Method
as_c_array
Prepare the collection to pass as an argument of a C function
python/treelite/sklearn/importer.py:53
↓ 37 callers
Method
Clear
include/treelite/detail/contiguous_array.h:182
↓ 37 callers
Method
LeafScalar
src/model_builder/model_builder.cc:214
↓ 34 callers
Method
Key
src/model_loader/detail/xgboost_json/sax_adapters.cc:64
↓ 32 callers
Method
DeserializeArray
include/treelite/detail/serializer_mixins.h:60
↓ 30 callers
Method
DeserializeScalar
include/treelite/detail/serializer_mixins.h:51
↓ 30 callers
Method
should_ignore_upcoming_value
Perform this check at the top of every value handling function, to ignore extra fields from the JSON string
src/model_loader/detail/xgboost_json/delegated_handler.h:191
↓ 29 callers
Function
GetPyBufferFromArray
include/treelite/detail/serializer.h:30
↓ 29 callers
Method
Size
include/treelite/detail/contiguous_array.h:138
↓ 29 callers
Method
get_field
Get a field Parameters ---------- name: Name of the field. Consult :doc:`the model spec </serialization/
python/treelite/model.py:519
↓ 28 callers
Method
StartTree
src/model_builder/model_builder.cc:95
↓ 27 callers
Method
CommitModel
src/model_builder/model_builder.cc:279
↓ 27 callers
Method
EndTree
src/model_builder/model_builder.cc:104
↓ 26 callers
Function
InitArrayFromPyBufferWithCopy
include/treelite/detail/serializer.h:119
↓ 26 callers
Method
SerializeArray
include/treelite/detail/serializer_mixins.h:147
↓ 26 callers
Function
c_str
Convert a Python string to C string
python/treelite/util.py:38
↓ 24 callers
Method
NumericalTest
src/model_builder/model_builder.cc:173
↓ 23 callers
Function
GetModelBuilder
src/model_builder/model_builder.cc:393
↓ 20 callers
Method
Reserve
include/treelite/detail/contiguous_array.h:148
↓ 20 callers
Method
set_field
Set a field Parameters ---------- name: Name of the field. Consult :doc:`the model spec </serialization/
python/treelite/model.py:545
↓ 19 callers
Method
start_node
Start a new node Parameters ---------- node_key: Integer key that unique identifies the node
python/treelite/model_builder.py:197
↓ 18 callers
Function
GetPyBufferFromScalar
include/treelite/detail/serializer.h:75
↓ 17 callers
Method
DumpAsJSON
src/json_serializer.cc:219
↓ 17 callers
Method
SerializeScalar
include/treelite/detail/serializer_mixins.h:137
↓ 17 callers
Method
end_node
End the current node
python/treelite/model_builder.py:210
↓ 14 callers
Method
Data
include/treelite/detail/contiguous_array.h:108
↓ 13 callers
Method
GetNumTree
include/treelite/tree.h:478
↓ 13 callers
Method
add
Add an array to the collection
python/treelite/sklearn/importer.py:42
↓ 13 callers
Function
c_array
Convert a Python byte array to C array WARNING ------- DO NOT USE THIS FUNCTION if performance is critical. Instead, use np.array(*)
python/treelite/util.py:56
↓ 12 callers
Method
Read
src/model_loader/xgboost_legacy.cc:67
↓ 12 callers
Function
TemporaryDirectory
Simulate the effect of 'ignore_cleanup_errors' parameter of tempfile.TemporaryDirectory. The parameter is only available for Python >= 3.10.
tests/python/util.py:124
↓ 12 callers
Function
TypeInfoToString
src/enum/typeinfo.cc:15
↓ 12 callers
Method
leaf
Declare the current node as a leaf node Parameters ---------- leaf_value: Value of leaf output
python/treelite/model_builder.py:302
↓ 12 callers
Function
make_tree_stump
()
tests/python/test_model_concat.py:22
↓ 10 callers
Method
Empty
include/treelite/detail/contiguous_array.h:143
↓ 10 callers
Method
IsLeaf
src/serializer.cc:75
↓ 9 callers
Function
AssertDocumentValid
tests/cpp/test_model_builder.cc:29
↓ 9 callers
Function
InitScalarFromPyBuffer
include/treelite/detail/serializer.h:131
↓ 9 callers
Method
LeafVector
! * \brief get leaf vector of the leaf node; useful for multi-class random forest classifier * \param nid ID of node being queried */
include/treelite/tree.h:218
↓ 9 callers
Function
to_categorical
Generate a Pandas DataFrame with a mix of numerical and categorical columns. Also returns a NumPy array whose value is equal to the DataFrame, exc
tests/python/util.py:43
↓ 8 callers
Method
CategoricalTest
src/model_builder/model_builder.cc:192
↓ 8 callers
Method
InitializeMetadata
src/model_builder/model_builder.cc:290
↓ 8 callers
Method
LeafValue
src/serializer.cc:78
↓ 8 callers
Function
ParallelFor
include/treelite/detail/threading_utils.h:111
↓ 8 callers
Function
copy_with_logging
Call shutil.copy() with logging
python/packager/util.py:18
↓ 8 callers
Function
py_str
Convert C string back to Python string
python/treelite/util.py:51
↓ 7 callers
Method
Double
src/model_loader/detail/xgboost_json/sax_adapters.cc:47
↓ 7 callers
Method
Gain
src/model_builder/model_builder.cc:258
↓ 7 callers
Method
Int
src/model_loader/detail/xgboost_json/sax_adapters.cc:31
↓ 7 callers
Function
OpenFileForReadAsStream
include/treelite/detail/file_utils.h:20
↓ 7 callers
Function
Predict
src/gtil/predict.cc:399
↓ 7 callers
Method
Resize
include/treelite/detail/contiguous_array.h:157
↓ 7 callers
Function
WriteArray
src/json_serializer.cc:59
↓ 7 callers
Function
WriteString
src/json_serializer.cc:77
↓ 7 callers
Function
_lib_name
Return platform dependent shared object name.
python/packager/nativelib.py:17
↓ 7 callers
Method
start_tree
Start a new tree
python/treelite/model_builder.py:189
↓ 6 callers
Method
DataCount
src/model_builder/model_builder.cc:265
↓ 6 callers
Method
EndArray
src/model_loader/detail/xgboost_json/sax_adapters.cc:76
↓ 6 callers
Method
GetLeafOutputType
include/treelite/tree.h:475
↓ 6 callers
Method
GetThresholdType
include/treelite/tree.h:472
↓ 6 callers
Method
LeafVector
src/model_builder/model_builder.cc:226
↓ 6 callers
Method
LeftChild
Getters **/ ! * \brief Index of the node's left child * \param nid ID of node being queried */
include/treelite/tree.h:169
↓ 6 callers
Method
RightChild
! * \brief Index of the node's right child * \param nid ID of node being queried */
include/treelite/tree.h:176
↓ 6 callers
Method
Run
include/treelite/detail/omp_exception.h:32
↓ 6 callers
Method
StartArray
src/model_loader/detail/xgboost_json/sax_adapters.cc:72
↓ 6 callers
Function
StringStartsWith
src/model_loader/detail/string_utils.h:16
↓ 6 callers
Function
_get_model_filename
(name, model_format)
tests/python/test_xgboost_integration.py:33
↓ 6 callers
Method
end_tree
End the current tree
python/treelite/model_builder.py:193
↓ 6 callers
Method
from_xgboost
Deprecated; please use :py:meth:`~treelite.frontend.from_xgboost` instead.
python/treelite/model.py:137
↓ 6 callers
Method
numerical_test
Declare the current node as a numerical test node, where the test is of form [feature value] [op] [threshold]. Data points for which
python/treelite/model_builder.py:215
↓ 6 callers
Function
omp_get_thread_num
include/treelite/detail/threading_utils.h:36
↓ 5 callers
Method
AsVector
include/treelite/detail/contiguous_array.h:243
↓ 5 callers
Method
Bool
src/model_loader/detail/xgboost_json/sax_adapters.cc:27
↓ 5 callers
Method
Gain
! * \brief Get gain value * \param nid ID of node being queried */
include/treelite/tree.h:318
↓ 5 callers
Function
ParseAttributes
src/model_builder/detail/json_parsing.h:212
↓ 5 callers
Method
SumHess
src/model_builder/model_builder.cc:272
↓ 5 callers
Function
TestRoundTrip
tests/cpp/test_serializer.cc:33
↓ 5 callers
Function
_ensure_scalar_int
(x: Any)
python/treelite/sklearn/exporter.py:12
↓ 5 callers
Function
_get_limits
Try to find the strategy's limits. Raises AttributeError if limits cannot be determined. Credit: Carl Simon Adorf (@csadorf) https://gith
tests/python/hypothesis_util.py:15
↓ 5 callers
Function
_qualify_path
(prefix, path)
tests/python/metadata.py:85
↓ 5 callers
Method
asdict
Convert to dictionary
python/treelite/model_builder.py:43
↓ 5 callers
Method
commit
Conclude model building and obtain the final model object. Returns ------- model : :py:class:`Model` Fin
python/treelite/model_builder.py:387
↓ 5 callers
Method
dump_as_json
Dump the model as a JSON string. This is useful for inspecting details of the tree ensemble model. Parameters ------
python/treelite/model.py:171
↓ 5 callers
Function
invalid_numerical_test
(left_child_key, right_child_key)
tests/python/test_model_builder.py:66
↓ 5 callers
Function
raise_not_rf_error
(reason)
python/treelite/sklearn/exporter.py:180
↓ 5 callers
Method
update
Parse config_settings from Pip (or other PEP 517 frontend)
python/packager/build_config.py:33
↓ 4 callers
Method
Clone
include/treelite/detail/tree.h:33
↓ 4 callers
Method
EndObject
src/model_loader/detail/xgboost_json/sax_adapters.cc:68
↓ 4 callers
Method
Extend
include/treelite/detail/contiguous_array.h:201
↓ 4 callers
Function
GetOutputShape
src/gtil/output_shape.cc:17
↓ 4 callers
Function
LoadSKLearnModel
src/model_loader/sklearn.cc:201
↓ 4 callers
Method
SerializeHeader
src/serializer.cc:91
↓ 4 callers
Method
SerializeToStream
src/serializer.cc:475
↓ 4 callers
Method
SerializeTrees
src/serializer.cc:128
↓ 4 callers
Function
Split
src/model_loader/lightgbm.cc:157
↓ 4 callers
Method
SplitIndex
src/serializer.cc:72
next →
1–100 of 686, ranked by callers