testbed: testbed - Test internal hhcartr functions.

Description Usage Arguments Value

View source: R/testbed.R

Description

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"].

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
testbed(
  X,
  y,
  most_freq_class,
  split_original,
  n_classes,
  max_features,
  test_func,
  n_features,
  X_matrix
)

Arguments

X

Training data, the feature variables.

y

Training data, the 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

The number of classes in y.

max_features

The maximum number of features to use when training random forests.

test_func

The hhcartr function to be tested.

n_features

The number of feature columns in the training dataset.

X_matrix

The A-matrix - rows containing the most frequent class in the training dataset.

Value

Returns the output of the test_func to be tested (if it returns output).


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