Learn R Programming

hhcartr (version 1.0.0)

NNode: NNode returns a tree node.

Description

This internal function is used to create a tree node. Remaining parameters will be initialised as the tree induction process progresses.

Usage

NNode(
  gini,
  num_samples,
  num_samples_per_class,
  predicted_class,
  parent_node,
  objectid,
  oob_row_indices = NA
)

Arguments

gini

The gini index of the node.

num_samples

The number of samples at this node.

num_samples_per_class

A table showing class distribution at this node.

predicted_class

If a leaf node, the predicted class of this node.

parent_node

The parent node object for this child node.

objectid

A unique id for this node object.

oob_row_indices

For a root node the out-of-bag indices from original training set used to create this tree.

Value

a tree node of type hash.