Nest an existing, tuned model together with more features into another model and tune the latter
greedy_nestor.Rd
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.
Arguments
- x
named numeric matrix (samples x features). Features only meant for the late model are exactly those matching
x
'sli_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
andy_hat
, the true and predicted outcomes, respectively, and return a numeric scalar; the lower, the better the model. Seeerror_rate()
orneg_roc_auc()
for examples.- model1
Model
R6 object. The early model trained on the expression data, with thefit_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.