hhcart_run_classifier: hhcart_run_classifier - This function calls grow_tree_() to...

Description Usage Arguments Value

View source: R/hhcartr_run_classifier.R

Description

hhcart_run_classifier - This function calls grow_tree_() to induce a decision tree.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
hhcart_run_classifier(
  train_set,
  sample_size,
  j,
  n_min,
  min_node_impurity,
  sampleWithReplacement,
  useIdentity,
  classify,
  n_features,
  n_classes,
  max_features = NA
)

Arguments

train_set

The training data.

sample_size

The sample size parameter is used to determine how much of the training dataset is actually used during training. A value of 1.0 allows all of the current training dataset to be used for training. A value of less than one will mean that proportion of the training dataset will be selected at random and then used for training. The value of parameter sampleWithReplacement will determine if the random sampling of the training dataset is performed using replacement or not. The default value is 1.0.

j

Not used, kept for compatibility.

n_min

The n_min parameter is used to stop splitting a node when a minimum number of samples at that node has been reached. The default value is 2.

min_node_impurity

The min node impurity parameter is used to stop splitting a node if the node impurity at that node is less than this value. The node impurity is calculated using the hyperplane Gini index. The default value is 0.2.

sampleWithReplacement

The sampleWithReplacement parameter is used in conjunction with the sample size parameter. The sampleWithReplacement parameter will determine if sampling from the training dataset is done with or without replacement. The default value is FALSE.

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 indicates that the data is for building a classification model. A value of FALSE and a regression model will be induced.

n_features

The number of features in the training data.

n_classes

The number of classes in the training data.

max_features

The max features parameter determines the number of features to consider when looking for the best split, and can take one of the values listed below. The default value is “sqrt”.

Value

Returns an induced decision tree.


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