This internal function is used to grow the decision tree, it is called recursively until the stopping criteria are met.
grow_tree_(
node,
X,
y,
n_min,
min_node_impurity,
useIdentity,
classify = TRUE,
n_features,
n_classes,
max_features,
depth = 0
)
The current node to be tested for a split.
The feature variables of the current node being processed.
The target variable for the feature variables.
The n_min parameter is used to terminate node splitting when a minimum number of samples at that node has been reached. The default value is 2.
Splitting a node will stop when the impurity of a node is less than min_node_impurity. The node impurity is calculated using the hyperplane Gini index. The default value is 0.2.
The useIdentity parameter when set TRUE will result in hhcartr using the original training data to find the optimal splits rather than using the reflected data. The default value is FALSE.
The classify parameter when set TRUE will result in hhcartr performing a classification, when set FALSE will perform a regression.
The number of feature variables.
The number of classes in the target variable.
The maximum number of features to consider in the current split.
This parameter is not used as yet.
Returns the latest node of type NNode.
The following parameters are supported: