Define Predictor of a Deep Distributional Regression Model
from_preds_to_dist_torch(
list_pred_param,
family = NULL,
output_dim = 1L,
mapping = NULL,
from_family_to_distfun = make_torch_dist,
from_distfun_to_dist = from_distfun_to_dist_torch,
add_layer_shared_pred = function(input_shape, units) layer_dense_torch(input_shape =
input_shape, units = units, use_bias = FALSE),
trafo_list = NULL
)
a list with input tensors and output tensors that can be passed
to, e.g., torch_model
list of output(-lists) generated from
subnetwork_init
see ?deepregression
; if NULL, concatenated
list_pred_param
entries are returned (after applying mapping if provided)
dimension of the output
a list of integers. The i-th list item defines which element
elements of list_pred_param
are used for the i-th parameter.
For example, mapping = list(1,2,1:2)
means that list_pred_param[[1]]
is used for the first distribution parameter, list_pred_param[[2]]
for
the second distribution parameter and list_pred_param[[3]]
for both
distribution parameters (and then added once to list_pred_param[[1]]
and
once to list_pred_param[[2]]
)
function to create a dist_fun
(see ?distfun_to_dist
) from the given character family
function creating a torch distribution based on the
prediction tensors and dist_fun
. See ?distfun_to_dist
layer to extend shared layers defined in mapping
a list of transformation function to convert the scale of the additive predictors to the respective distribution parameter