keras_dr: Compile a Deep Distributional Regression Model

Description Usage Arguments Value

View source: R/deepregression.R

Description

Compile a Deep Distributional Regression Model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
keras_dr(
  list_pred_param,
  weights = NULL,
  optimizer = tf$keras$optimizers$Adam(),
  model_fun = keras_model,
  monitor_metrics = list(),
  from_preds_to_output = from_preds_to_dist,
  loss = from_dist_to_loss(family = list(...)$family, weights = weights),
  additional_penalty = NULL,
  ...
)

Arguments

list_pred_param

list of input-output(-lists) generated from subnetwork_init

weights

vector of positive values; optional (default = 1 for all observations)

optimizer

optimizer used. Per default Adam

model_fun

which function to use for model building (default keras_model)

monitor_metrics

Further metrics to monitor

from_preds_to_output

function taking the list_pred_param outputs and transforms it into a single network output

loss

the model's loss function; per default evaluated based on the arguments family and weights using from_dist_to_loss

additional_penalty

a penalty that is added to the negative log-likelihood; must be a function of model$trainable_weights with suitable subsetting

...

arguments passed to from_preds_to_output

Value

a list with input tensors and output tensors that can be passed to, e.g., keras_model


deepregression documentation built on Oct. 5, 2021, 1:06 a.m.