Learn R Programming

sortinghat (version 0.1)

check_arguments: Checks the arguments passed to the error rate estimator functions.

Description

This function is a helper function that checks the arguments passed to make sure the input is valid and consistent across all error rate estimators.

Usage

check_arguments(x, y, train, classify)

Arguments

x
a matrix of n observations and p features
y
a vector of n class labels
train
a function that builds the classifier (See details)
classify
a function that classified observations from the constructed classifier from train. (See details.)

Value

  • TRUE invisibly if no errors are encountered.

Details

We expect that the first two arguments of the classifier function given in train are x and y, corresponding to the data matrix and the vector of their labels. Additional arguments can be passed to the train function. The returned object should be a classifier that will be passed to the function given in the classify argument.