best_split_: best_split_ finds the best feature column to split on.

Description Usage Arguments Value

View source: R/best_split.R

Description

This internal function is used to find the feature column that will offer the best split based on using the Gini index or gini hyperplane index.

Usage

1
2
3
4
5
6
7
8
9
best_split_(
  X,
  y,
  most_freq_class,
  split_original,
  n_classes,
  max_features,
  depth
)

Arguments

X

feature variables to search for the best split.

y

target variable.

most_freq_class

the most frequent class in the target variable.

split_original

boolean to indicate whether to split on original data or reflected data.

n_classes

number of classes in the y column

max_features

the maximum number of features to use when splitting a node

depth

the depth of the current tree.

Value

a list of the following variables (best_idx, best_thr, best_gini)


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