Ensembling deepregression models
# S3 method for deepregression
ensemble(
x,
n_ensemble = 5,
reinitialize = TRUE,
mylapply = lapply,
verbose = FALSE,
patience = 20,
plot = TRUE,
print_members = TRUE,
stop_if_nan = TRUE,
save_weights = TRUE,
callbacks = list(),
save_fun = NULL,
seed = seq_len(n_ensemble),
...
)
object of class "drEnsemble"
, containing the original
"deepregression"
model together with a list of ensembling
results (training history and, if save_weights
is TRUE
,
the trained weights of each ensemble member)
object of class "deepregression"
to ensemble
numeric; number of ensemble members to fit
logical; if TRUE
(default), model weights are
initialized randomly prior to fitting each member. Fixed weights are
not affected
lapply function to be used; defaults to lapply
whether to print training in each fold
number of patience for early stopping
whether to plot the resulting losses in each fold
logical; print results for each member
logical; whether to stop CV if NaN values occur
whether to save final weights of each ensemble member;
defaults to TRUE
a list of callbacks used for fitting
function applied to the model in each fold to be stored in the final result
seed for reproducibility
further arguments passed to object$fit_fun