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.
hhcart_verify_input_data(
X,
y,
classify = TRUE,
max_features_ = 0,
n_features_ = 0,
rforest = FALSE
)
The training dataset.
target variable column.
Default is TRUE. Set TRUE for a classification problem and FALSE for a regression problem.
Default is 0. The maximum number of features to search for an optimal split.
Default is 0. The total number of feature columns in the training dataset.
Default is FALSE. Indicates whether this function is being called from HHDecisionTree or HHRandomForest.
Nothing if all checks are passed, otherwise the function stops.