Function interface for the return value of multitune()
Arguments
- x
Named numeric matrix. Predictor matrix without
NAs. Samples correspond to rows. Discrete features are encoded as binary dummy variables.- y
Named list with the response in thee formats:
"bin", a named numeric one-column matrix, binary response,"cox", a named numeric two-column matrix, with columns"time_to_event"and"event"(0 = censoring, 1 = event), the response in the Cox format,"true", a named numeric one-column matrix, true binary response.
The rownames of
y[["bin"]]andy[["true"]]are a subset of the rownames ofxand, in general, do not coincide. Useintersect_by_names()to get equal rownames.- val_error_fun
Function to calculate the error of validated predictions. For its interface, see
val_error_fun_prototype()- ...
atomic vectors. Every vector corresponds to a hyperparameter and holds candidate values for it. For every combination of hyperparameters, fit a model by calling the
fitterparameter ofmultitune().
Value
A multitune_obj S3 object with underlying class list. It fulfills the requirements
of fitter_prototype() and, in addition, it has the following elements:
val_predict_list: a list of row-named one-column matrices, the validated predictions of the fitted models.lambda: a character vector, the hyperparameter combinations as a string.lambda_min_index: an integer, the index of the hyperparameter combination of the model with the lowest validation error.lambda_min: a character, the hyperparameter combination of the model with the lowest validation error.val_error: a numeric vector, the validation errors of the fitted models.min_error: a numeric scalar, the validation error of the model with the lowest validation error.fit_obj_list: a list offit_objs of the fitted models. Ifselect = TRUEinmultitune(), all but the model with the lowest validation error areNA.
