RFNode-class: RFNode Constructor

Description Arguments Format Slots

Description

'RFNode' is the basic element inside a 'RFTree'. For each node, it contains the corresponding data that are assigned to the node. The 'RFNode' can be either a leaf or a tree node (non-leaf). If it is a leaf node, 'avgfunc' can be called to aggregate all the observations in the node and save a prediction for the node. If it is a tree node, it will contains 'leftChild' and 'rightChild' which will be another two 'RFNode's. The parent node can be used to track the 'splitFeature' and 'splitValue'. Please note that in the 'RFNode', 'sampleIndex' essentially tells what data reside in the node. Every node contains two 'sampleIndex': 'averagingSampleIndex' and 'splittingSampleIndex'. 'averagingSampleIndex' is used to generate aggregated prediction for the node. 'splittingSampleIndex' is used for 'honestRF' which stores the splitting data when creating the tree. In default, 'RFNode' has the same 'averagingSampleIndex' and 'splittingSampleIndex'.

A constructor to create a RFNode

Arguments

sampleIndex

A list of index of dataset used in this node and its children. 'sampleIndex' contains two keys 'averagingSampleIndex' and 'splittingSampleIndex'. 'averagingSampleIndex' is used to generate aggregated prediction for the node. 'splittingSampleIndex' is used for 'honestRF' which stores the splitting data when creating the tree. In default, 'splittingSampleIndex' is the same as 'averagingSampleIndex'.

splitFeature

Name of the feature that is used for splitting in this node.

splitValue

The value that is used for splitting in this node.

child

If the node is not a leaf node, the 'child' will be a list of two 'RFNode' objects. If it is a leaf node, the 'child' will be 'NULL'.

Format

An object of class NULL of length 0.

Slots

sampleIndex

A list of index of dataset used in this node and its children. 'sampleIndex' contains two keys 'averagingSampleIndex' and 'splittingSampleIndex'. 'averagingSampleIndex' is used to generate aggregated prediction for the node. 'splittingSampleIndex' is used for 'honestRF' which stores the splitting data when creating the tree. In default, 'splittingSampleIndex' is the same as 'averagingSampleIndex'.

splitFeature

Name of the feature that is used for splitting in this node.

splitValue

The value that is used for splitting in this node.

child

If the node is not a leaf node, the 'child' will be a list of two 'RFNode' objects. If it is a leaf node, the 'child' will be 'NULL'.

nSplit

Number of observations in the splitting dataset in this node.

nAverage

Number of observations in the averaging dataset in this node.


soerenkuenzel/hte documentation built on June 12, 2018, 4:26 p.m.