Treelite
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Model Class Referenceabstract

thin wrapper for tree ensemble model More...

#include <tree.h>

Inheritance diagram for Model:
Inheritance graph
[legend]
Collaboration diagram for Model:
Collaboration graph
[legend]

Public Member Functions

 Model ()
 disable copy; use default move
 
 Model (const Model &)=delete
 
Modeloperator= (const Model &)=delete
 
 Model (Model &&)=default
 
Modeloperator= (Model &&)=default
 
TypeInfo GetThresholdType () const
 
TypeInfo GetLeafOutputType () const
 
template<typename Func >
auto Dispatch (Func func)
 
template<typename Func >
auto Dispatch (Func func) const
 
virtual std::size_t GetNumTree () const =0
 
virtual void SetTreeLimit (std::size_t limit)=0
 
virtual void DumpAsJSON (std::ostream &fo, bool pretty_print) const =0
 
std::string DumpAsJSON (bool pretty_print) const
 
std::vector< PyBufferFrameGetPyBuffer ()
 
void SerializeToFile (FILE *dest_fp)
 

Static Public Member Functions

template<typename ThresholdType , typename LeafOutputType >
static std::unique_ptr< ModelCreate ()
 
static std::unique_ptr< ModelCreate (TypeInfo threshold_type, TypeInfo leaf_output_type)
 
static std::unique_ptr< ModelCreateFromPyBuffer (std::vector< PyBufferFrame > frames)
 
static std::unique_ptr< ModelDeserializeFromFile (FILE *src_fp)
 

Public Attributes

int num_feature
 number of features used for the model. It is assumed that all feature indices are between 0 and [num_feature]-1.
 
TaskType task_type
 Task type.
 
bool average_tree_output
 whether to average tree outputs
 
TaskParam task_param
 Group of parameters that are specific to the particular task type.
 
ModelParam param
 extra parameters
 

Detailed Description

thin wrapper for tree ensemble model

Definition at line 655 of file tree.h.


The documentation for this class was generated from the following files: