class cv::ml::DTrees::Node

Overview

The class represents a decision tree node. Moreā€¦

#include <ml.hpp>

class Node
{
public:
    // fields

    int classIdx;
    int defaultDir;
    int left;
    int parent;
    int right;
    int split;
    double value;
};

Detailed Documentation

The class represents a decision tree node.

Fields

int classIdx

Class index normalized to 0..class_count-1 range and assigned to the node. It is used internally in classification trees and tree ensembles.

int defaultDir

Default direction where to go (-1: left or +1: right). It helps in the case of missing values.

int left

Index of the left child node.

int parent

Index of the parent node.

int right

Index of right child node.

int split

Index of the first split.

double value

Value at the node: a class label in case of classification or estimated function value in case of regression.