hhcart_verify_input_data: hhcart_verify_input_data verify the input data.

Description Usage Arguments Value

View source: R/hhcartr_verify_input_data.R

Description

This internal function is used to perform some basic checks on the input dataset. The first check to fail will stop the model from being instantiated. The following checks are performed: - there must be no NA's in the training dataset. - all columns in the training datasets must contain numeric data only. - max_features must not be greater than n_features. - if its a classification problem the target variable must be categorical. - if its a regression problem the target variable must not be categorical.

Usage

1
2
3
4
5
6
7
8
hhcart_verify_input_data(
  X,
  y,
  classify = TRUE,
  max_features_ = 0,
  n_features_ = 0,
  rforest = FALSE
)

Arguments

X

The training dataset.

y

target variable column.

classify

Default is TRUE. Set TRUE for a classification problem and FALSE for a regression problem.

max_features_

Default is 0. The maximum number of features to search for an optimal split.

n_features_

Default is 0. The total number of feature columns in the training dataset.

rforest

Default is FALSE. Indicates whether this function is being called from HHDecisionTree or HHRandomForest.

Value

Nothing if all checks are passed, otherwise the function stops.


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