Deep ensembling for neural network transformation models
# S3 method for deeptrafo
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),
...
)
Ensemble of "deeptrafo"
models with list of training histories
and fitted weights included in ensemble_results
. For details see
the return statment in ensemble
.
Object of class "deeptrafo"
.
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.
Function; lapply
function to be used; defaults to
lapply
Logical; whether to print training in each fold.
Integer; number of patience for early stopping.
Logical; whether to plot the resulting losses in each fold.
Logical; print results for each member.
Logical; whether to stop ensembling if NaN
values
occur
Logical; whether to save the ensemble weights.
List; callbacks used for fitting.
Function; function to be applied to each member to be stored in the final result.
Numeric vector of length n_ensemble
; seeds for model
initialization.
Further arguments passed to object$fit_fun
.