Treelite
Classes | Macros | Enumerations | Functions
tree.h File Reference

model structure for tree ensemble More...

#include <treelite/base.h>
#include <treelite/version.h>
#include <algorithm>
#include <map>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
#include <utility>
#include <type_traits>
#include <limits>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <cstdio>
#include "tree_impl.h"
Include dependency graph for tree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ModelImpl< ThresholdType, LeafOutputType >
 
struct  PyBufferFrame
 
class  ContiguousArray< T >
 
struct  TaskParam
 Group of parameters that are dependent on the choice of the task type. More...
 
class  Tree< ThresholdType, LeafOutputType >
 in-memory representation of a decision tree More...
 
struct  Tree< ThresholdType, LeafOutputType >::Node
 tree node More...
 
union  Tree< ThresholdType, LeafOutputType >::Node::Info
 store either leaf value or decision threshold More...
 
struct  ModelParam
 
class  Model
 thin wrapper for tree ensemble model More...
 
class  ModelImpl< ThresholdType, LeafOutputType >
 

Macros

#define __TREELITE_STR(x)   #x
 
#define _TREELITE_STR(x)   __TREELITE_STR(x)
 
#define TREELITE_MAX_PRED_TRANSFORM_LENGTH   256
 
#define TREELITE_DLL_EXPORT
 

Enumerations

enum  TaskType : uint8_t { kBinaryClfRegr = 0, kMultiClfGrovePerClass = 1, kMultiClfProbDistLeaf = 2, kMultiClfCategLeaf = 3 }
 Enum type representing the task type. More...
 

Functions

std::string TaskTypeToString (TaskType type)
 
std::string OutputTypeToString (TaskParam::OutputType type)
 
void InitParamAndCheck (ModelParam *param, const std::vector< std::pair< std::string, std::string >> &cfg)
 

Detailed Description

model structure for tree ensemble

Copyright (c) 2017-2021 by Contributors

Author
Hyunsu Cho

Definition in file tree.h.

Enumeration Type Documentation

◆ TaskType

enum TaskType : uint8_t
strong

Enum type representing the task type.

The task type places constraints on the parameters of TaskParameter. See the docstring for each enum constants for more details.

Definition at line 107 of file tree.h.