treelite
Namespaces | Classes | Typedefs | Enumerations | Functions
treelite Namespace Reference

Namespaces

 detail
 
 gtil
 
 model_builder
 
 model_loader
 

Classes

class  ContiguousArray
 
class  OMPException
 OMP Exception class catches, saves and rethrows exception from OMP blocks. More...
 
struct  Error
 Exception class that will be thrown by Treelite. More...
 
class  DateLogger
 
class  LogMessageFatal
 
class  LogMessage
 
class  LogMessageWarning
 
class  LogCallbackRegistry
 
class  ThreadLocalStore
 A thread-local storage. More...
 
class  ModelPreset
 Typed portion of the model class. More...
 
struct  Version
 
class  Tree
 in-memory representation of a decision tree More...
 
class  Model
 Model class for tree ensemble model. More...
 

Typedefs

using LogCallbackRegistryStore = ThreadLocalStore< LogCallbackRegistry >
 
using PyBufferFrame = TreelitePyBufferFrame
 
using ModelPresetVariant = std::variant< ModelPreset< float, float >, ModelPreset< double, double > >
 

Enumerations

enum class  Operator : std::int8_t {
  kNone , kEQ , kLT , kLE ,
  kGT , kGE
}
 Type of comparison operators used in numerical test nodes. More...
 
enum class  TaskType : std::uint8_t {
  kBinaryClf = 0 , kRegressor = 1 , kMultiClf = 2 , kLearningToRank = 3 ,
  kIsolationForest = 4
}
 Enum type representing the task type. More...
 
enum class  TreeNodeType : std::int8_t { kLeafNode = 0 , kNumericalTestNode = 1 , kCategoricalTestNode = 2 }
 Tree node type. More...
 
enum class  TypeInfo : std::uint8_t { kInvalid = 0 , kUInt32 = 1 , kFloat32 = 2 , kFloat64 = 3 }
 Types used by thresholds and leaf outputs. More...
 

Functions

std::string OperatorToString (Operator type)
 Get string representation of Operator. More...
 
Operator OperatorFromString (std::string const &name)
 Get Operator from string. More...
 
std::string TaskTypeToString (TaskType type)
 Get string representation of TaskType. More...
 
TaskType TaskTypeFromString (std::string const &str)
 Get TaskType from string. More...
 
std::string TreeNodeTypeToString (TreeNodeType type)
 Get string representation of TreeNodeType. More...
 
TreeNodeType TreeNodeTypeFromString (std::string const &name)
 Get NodeType from string. More...
 
std::string TypeInfoToString (treelite::TypeInfo info)
 Get string representation of TypeInfo. More...
 
TypeInfo TypeInfoFromString (std::string const &str)
 Get TypeInfo from string. More...
 
template<typename T >
TypeInfo TypeInfoFromType ()
 Convert a template type into a type info. More...
 
template<typename X , typename Y >
std::unique_ptr< std::string > LogCheckFormat (X const &x, Y const &y)
 
template<int variant_index>
ModelPresetVariant SetModelPresetVariant (int target_variant_index)
 
std::unique_ptr< ModelConcatenateModelObjects (std::vector< Model const * > const &objs)
 Concatenate multiple model objects into a single model object by copying all member trees into the destination model object. More...
 

Typedef Documentation

◆ LogCallbackRegistryStore

◆ ModelPresetVariant

using treelite::ModelPresetVariant = typedef std::variant<ModelPreset<float, float>, ModelPreset<double, double> >

◆ PyBufferFrame

Enumeration Type Documentation

◆ Operator

enum treelite::Operator : std::int8_t
strong

Type of comparison operators used in numerical test nodes.

Enumerator
kNone 
kEQ 

operator ==

kLT 

operator <

kLE 

operator <=

kGT 

operator >

kGE 

operator >=

◆ TaskType

enum treelite::TaskType : std::uint8_t
strong

Enum type representing the task type.

Enumerator
kBinaryClf 
kRegressor 
kMultiClf 
kLearningToRank 
kIsolationForest 

◆ TreeNodeType

enum treelite::TreeNodeType : std::int8_t
strong

Tree node type.

Enumerator
kLeafNode 
kNumericalTestNode 
kCategoricalTestNode 

◆ TypeInfo

enum treelite::TypeInfo : std::uint8_t
strong

Types used by thresholds and leaf outputs.

Enumerator
kInvalid 
kUInt32 
kFloat32 
kFloat64 

Function Documentation

◆ ConcatenateModelObjects()

std::unique_ptr<Model> treelite::ConcatenateModelObjects ( std::vector< Model const * > const &  objs)

Concatenate multiple model objects into a single model object by copying all member trees into the destination model object.

Parameters
objsList of model objects
Returns
Concatenated model

◆ LogCheckFormat()

template<typename X , typename Y >
std::unique_ptr<std::string> treelite::LogCheckFormat ( X const &  x,
Y const &  y 
)

◆ OperatorFromString()

Operator treelite::OperatorFromString ( std::string const &  name)

Get Operator from string.

◆ OperatorToString()

std::string treelite::OperatorToString ( Operator  type)

Get string representation of Operator.

◆ SetModelPresetVariant()

template<int variant_index>
ModelPresetVariant treelite::SetModelPresetVariant ( int  target_variant_index)

◆ TaskTypeFromString()

TaskType treelite::TaskTypeFromString ( std::string const &  str)

Get TaskType from string.

◆ TaskTypeToString()

std::string treelite::TaskTypeToString ( TaskType  type)

Get string representation of TaskType.

◆ TreeNodeTypeFromString()

TreeNodeType treelite::TreeNodeTypeFromString ( std::string const &  name)

Get NodeType from string.

◆ TreeNodeTypeToString()

std::string treelite::TreeNodeTypeToString ( TreeNodeType  type)

Get string representation of TreeNodeType.

◆ TypeInfoFromString()

TypeInfo treelite::TypeInfoFromString ( std::string const &  str)

Get TypeInfo from string.

◆ TypeInfoFromType()

template<typename T >
TypeInfo treelite::TypeInfoFromType ( )
inline

Convert a template type into a type info.

Template Parameters
templatetype to be converted
Returns
TypeInfo corresponding to the template type arg

◆ TypeInfoToString()

std::string treelite::TypeInfoToString ( treelite::TypeInfo  info)

Get string representation of TypeInfo.