treelite
Classes | Namespaces | Typedefs | Functions
model_builder.h File Reference

C++ API for constructing Model objects. More...

#include <treelite/enum/operator.h>
#include <treelite/enum/task_type.h>
#include <treelite/enum/tree_node_type.h>
#include <treelite/enum/typeinfo.h>
#include <array>
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <variant>
#include <vector>
Include dependency graph for model_builder.h:

Go to the source code of this file.

Classes

class  treelite::model_builder::ModelBuilder
 Model builder interface. More...
 
struct  treelite::model_builder::TreeAnnotation
 Annotation for individual trees. Use this object to look up which target and class each tree is associated with. More...
 
struct  treelite::model_builder::PostProcessorFunc
 Specification for postprocessor of prediction outputs. More...
 
struct  treelite::model_builder::Metadata
 Metadata object, consisting of metadata information about the model at large. More...
 

Namespaces

 treelite
 
 treelite::model_builder
 

Typedefs

using treelite::model_builder::PostProcessorConfigParam = std::variant< std::int64_t, double, std::string >
 Parameter type used to configure postprocessor functions. More...
 

Functions

std::unique_ptr< ModelBuilder > treelite::model_builder::GetModelBuilder (TypeInfo threshold_type, TypeInfo leaf_output_type, Metadata const &metadata, TreeAnnotation const &tree_annotation, PostProcessorFunc const &postprocessor, std::vector< double > const &base_scores, std::optional< std::string > const &attributes=std::nullopt)
 Initialize a model builder object with a given set of metadata. More...
 
std::unique_ptr< ModelBuilder > treelite::model_builder::GetModelBuilder (TypeInfo threshold_type, TypeInfo leaf_output_type)
 Initialize a model builder object with empty metadata. Remember to provide metadata later, with a call to InitializeMetadata(). More...
 
std::unique_ptr< ModelBuilder > treelite::model_builder::GetModelBuilder (std::string const &json_str)
 Initialize a model builder object from a JSON string. The JSON string must contain all relevant metadata. See GetModelBuilder for the list of necessary metadata. More...
 

Detailed Description

C++ API for constructing Model objects.

Copyright (c) 2023 by Contributors

Author
Hyunsu Cho