class cv::ml::DTrees::Split

Overview

The class represents split in a decision tree. Moreā€¦

#include <ml.hpp>

class Split
{
public:
    // fields

    float c;
    bool inversed;
    int next;
    float quality;
    int subsetOfs;
    int varIdx;
};

Detailed Documentation

The class represents split in a decision tree.

Fields

float c

The threshold value in case of split on an ordered variable. The rule is:

if var_value < c
  then next_node <- left
  else next_node <- right
bool inversed

If true, then the inverse split rule is used (i.e. left and right branches are exchanged in the rule expressions below).

int next

Index of the next split in the list of splits for the node.

float quality

The split quality, a positive number. It is used to choose the best split.

int subsetOfs

Offset of the bitset used by the split on a categorical variable. The rule is:

if bitset[var_value] == 1
    then next_node <- left
    else next_node <- right
int varIdx

Index of variable on which the split is created.