koho.cpp  1.1.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
koho::Node Class Reference

Node of a binary tree. More...

#include <decision_tree.h>

Collaboration diagram for koho::Node:
Collaboration graph
[legend]

Public Member Functions

 Node (NodesIdx_t left_child, NodesIdx_t right_child, FeaturesIdx_t feature, int NA, Features_t threshold, const std::vector< std::vector< Histogram_t >> &histogram, double impurity, double improvement)
 Create a new node. More...
 
void serialize (std::ofstream &fout)
 Serialize. More...
 

Static Public Member Functions

static Node deserialize (std::ifstream &fin)
 Deserialize. More...
 

Public Attributes

NodesIdx_t left_child
 
NodesIdx_t right_child
 
FeaturesIdx_t feature
 
int NA
 
Features_t threshold
 
std::vector< std::vector< Histogram_t > > histogram
 
double impurity
 
double improvement
 

Detailed Description

Node of a binary tree.

Constructor & Destructor Documentation

◆ Node()

koho::Node::Node ( NodesIdx_t  left_child,
NodesIdx_t  right_child,
FeaturesIdx_t  feature,
int  NA,
Features_t  threshold,
const std::vector< std::vector< Histogram_t >> &  histogram,
double  impurity,
double  improvement 
)

Create a new node.

Member Function Documentation

◆ deserialize()

Node koho::Node::deserialize ( std::ifstream &  fin)
static

Deserialize.

◆ serialize()

void koho::Node::serialize ( std::ofstream &  fout)

Serialize.

Member Data Documentation

◆ feature

FeaturesIdx_t koho::Node::feature

◆ histogram

std::vector<std::vector<Histogram_t> > koho::Node::histogram

◆ improvement

double koho::Node::improvement

◆ impurity

double koho::Node::impurity

◆ left_child

NodesIdx_t koho::Node::left_child

◆ NA

int koho::Node::NA

◆ right_child

NodesIdx_t koho::Node::right_child

◆ threshold

Features_t koho::Node::threshold

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