Skip to contents

Use the validated predictions of an existing model that only takes the epression part of the data as input features, and feed them together with the remaining features into another model. Fit and tune the second, late model.

Usage

greedy_nestor(x, y, val_error_fun, model1, fitter2, hyperparams2)

Arguments

x

named numeric matrix (samples x features). Features only meant for the late model are exactly those matching x's li_var_suffix attribute.

y

Named list with entries

  • "bin", a named numeric one-column matrix, binary response to be used for training,

  • "cox", a named numeric two-column matrix to be used for training, time to event and event (0 = censoring, 1 = event) in first and second column, respectively.

  • "true", a named numeric one-column matrix, binary response to be used for calculating the CV error.

val_error_fun

Function used to calculate the error of independently validated predictions. Must take two numeric vector of equal length: y and y_hat, the true and predicted outcomes, respectively, and return a numeric scalar; the lower, the better the model. See error_rate() or neg_roc_auc() for examples.

model1

Model R6 object. The early model trained on the expression data, with the fit_obj attribute set at least in its stored version, i.e., the early model is already there.

fitter2

A patroklos-compliant fitter with CV tuning (see README for more details).

hyperparams2

A named list with hyperparameters for the late model.

Value

A nested_fit S3 object.