torch_dr {deepregression} | R Documentation |
Compile a Deep Distributional Regression Model (Torch)
Description
Compile a Deep Distributional Regression Model (Torch)
Usage
torch_dr(
list_pred_param,
optimizer = torch::optim_adam,
model_fun = NULL,
monitor_metrics = list(),
from_preds_to_output = from_preds_to_dist_torch,
loss = from_dist_to_loss_torch(family = list(...)$family, weights = NULL),
additional_penalty = NULL,
...
)
Arguments
list_pred_param |
list of output(-lists) generated from
|
optimizer |
optimizer used. Per default Adam |
model_fun |
NULL not needed for torch |
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 |
additional_penalty |
a penalty that is added to the negative log-likelihood; must be a function of model$trainable_weights with suitable subsetting (not implemented for torch) |
... |
arguments passed to |
weights |
vector of positive values; optional (default = 1 for all observations) |
Value
a luz_module_generator
[Package deepregression version 2.2.0 Index]