ensemble.deeptrafo {deeptrafo}R Documentation

Deep ensembling for neural network transformation models

Description

Deep ensembling for neural network transformation models

Usage

## S3 method for class '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,
  ...
)

Arguments

x

Object of class "deeptrafo".

n_ensemble

Numeric; number of ensemble members to fit.

reinitialize

Logical; if TRUE (default), model weights are initialized randomly prior to fitting each member. Fixed weights are not affected.

mylapply

Function; lapply function to be used; defaults to lapply

verbose

Logical; whether to print training in each fold.

patience

Integer; number of patience for early stopping.

plot

Logical; whether to plot the resulting losses in each fold.

print_members

Logical; print results for each member.

stop_if_nan

Logical; whether to stop ensembling if NaN values occur

save_weights

Logical; whether to save the ensemble weights.

callbacks

List; callbacks used for fitting.

save_fun

Function; function to be applied to each member to be stored in the final result.

...

Further arguments passed to object$fit_fun.

Value

Ensemble of "deeptrafo" models with list of training histories and fitted weights included in ensemble_results. For details see the return statment in ensemble.


[Package deeptrafo version 0.1-1 Index]