This function allows the testing of internal hhcartr functions in a standalone fashion. Function testbed requires an export so that it can be used by the devtools::check() and devtools::test() functions. The currently supported values for parameter test_func are ["best_split_", "split_using_original_data", "reflect_feature_space", "hhcart_reflect_feature_space_g", "hhcartr_regressor_find_better_split"].
testbed(
X,
y,
most_freq_class,
split_original,
n_classes,
max_features,
test_func,
n_features,
X_matrix
)
Training data, the feature variables.
Training data, the target variable.
The most frequent class in the target variable.
boolean to indicate whether to split on original data or reflected data.
The number of classes in y.
The maximum number of features to use when training random forests.
The hhcartr function to be tested.
The number of feature columns in the training dataset.
The A-matrix - rows containing the most frequent class in the training dataset.
Returns the output of the test_func to be tested (if it returns output).