grow_tree_: grow_tree_

Description Usage Arguments Details Value

View source: R/grow_tree.R

Description

This internal function is used to grow the decision tree, it is called recursively until the stopping criteria are met.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
grow_tree_(
  node,
  X,
  y,
  n_min,
  min_node_impurity,
  useIdentity,
  classify = TRUE,
  n_features,
  n_classes,
  max_features,
  depth = 0
)

Arguments

node

The current node to be tested for a split.

X

The feature variables of the current node being processed.

y

The target variable for the feature variables.

n_min

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.

min_node_impurity

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.

useIdentity

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.

classify

The classify parameter when set TRUE will result in hhcartr performing a classification, when set FALSE will perform a regression.

n_features

The number of feature variables.

n_classes

The number of classes in the target variable.

max_features

The maximum number of features to consider in the current split.

depth

This parameter is not used as yet.

Details

The following parameters are supported:

Value

Returns the latest node of type NNode.


hhcartr documentation built on July 2, 2021, 9:06 a.m.