treelite
Public Member Functions | Public Attributes | List of all members
treelite::model_builder::TreeAnnotation Struct Reference

Annotation for individual trees. Use this object to look up which target and class each tree is associated with. More...

#include <model_builder.h>

Collaboration diagram for treelite::model_builder::TreeAnnotation:
Collaboration graph

Public Member Functions

 TreeAnnotation (std::int32_t num_tree, std::vector< std::int32_t > const &target_id, std::vector< std::int32_t > const &class_id)
 Constructor for TreeAnnotation object. More...
 

Public Attributes

std::int32_t num_tree {0}
 
std::vector< std::int32_t > target_id {}
 
std::vector< std::int32_t > class_id {}
 

Detailed Description

Annotation for individual trees. Use this object to look up which target and class each tree is associated with.

The output of each target / class is obtained by summing the outputs of all trees that are associated with that target / class. target_id[i] indicates the target the i-th tree is associated with. (-1 indicates that the tree is a multi-target tree, whose output gets counted for all targets.) class_id[i] indicates the class the i-th tree is associated with. (-1 indicates that the tree's output gets counted for all classes.)

Constructor & Destructor Documentation

◆ TreeAnnotation()

treelite::model_builder::TreeAnnotation::TreeAnnotation ( std::int32_t  num_tree,
std::vector< std::int32_t > const &  target_id,
std::vector< std::int32_t > const &  class_id 
)

Constructor for TreeAnnotation object.

Parameters
num_treeNumber of trees
target_idTarget that each tree is associated with (see explanation above)
class_idClass that each tree is associated with (see explanation above)

Member Data Documentation

◆ class_id

std::vector<std::int32_t> treelite::model_builder::TreeAnnotation::class_id {}

◆ num_tree

std::int32_t treelite::model_builder::TreeAnnotation::num_tree {0}

◆ target_id

std::vector<std::int32_t> treelite::model_builder::TreeAnnotation::target_id {}

The documentation for this struct was generated from the following file: