RFTree-class: RFTree Constructor

Description Arguments Format Slots

Description

'RFTree' is the unit component in the 'RF' which composes 'RFNode'. The tree uses recursively partitioning to determine the best 'splitFeature' and 'splitValue' for each level, and recursively split the dataset until it reaches the limitation according to 'nodesize'.

The actual storation of 'RFTree' is different from its input. 'sampleIndex' and 'nodesize' are actually two lists composing of those in splitting dataset and averaging dataset. In the original random forest, those are the same value. For other variant of random forest, such as honest random forest, they can be set differently. The constructor can be overwritten to reflect the change.

Arguments

x

A data frame of all training predictors.

y

A vector of all training responses.

mtry

The number of variables randomly selected at each split point. The default value is set to be one third of total number of features of the training data.

nodesize

The minimum observations contained in terminal nodes. The default value is 5.

sampleIndex

A list of the index of observations that are used as averaging dataset. The index are based on the original dataset 'x' and 'y' from forest. Essentially, 'x[sampleIndex]' generates the whole splitting dataset.

splitrule

A string to specify how to find the best split among all candidate feature values. The current version only supports 'variance' which minimizes the overall MSE after splitting. The default value is 'variance'.

categoricalFeatureCols

A list of index for all categorical data. Used for trees to detect categorical columns.

Format

An object of class NULL of length 0.

Slots

sampleIndex

A list of the index of observations that are used as averaging dataset. The index are based on the original dataset 'x' and 'y' from forest. Essentially, 'x[sampleIndex]' generates the whole splitting dataset.

root

A 'RFNode' object which is the root of the tree. If the class is extended, the list may contain the corresponding extended 'RFNode' object.


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