from_preds_to_dist: Define Predictor of a Deep Distributional Regression Model

Description Usage Arguments Value

View source: R/deepregression.R

Description

Define Predictor of a Deep Distributional Regression Model

Usage

1
2
3
4
5
6
7
8
9
from_preds_to_dist(
  list_pred_param,
  family = NULL,
  output_dim = 1L,
  mapping = NULL,
  from_distfun_to_dist = distfun_to_dist,
  add_layer_shared_pred = function(x, units) layer_dense(x, units = units, use_bias =
    FALSE)
)

Arguments

list_pred_param

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

family

see ?deepregression; if NULL, concatenated list_pred_param entries are returned (after applying mapping if provided)

output_dim

dimension of the output

mapping

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, map = 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]])

from_distfun_to_dist

function creating a tfp distribution based on the prediction tensors and dist_fun. See ?distfun_to_dist

add_layer_shared_pred

layer to extend shared layers defined in mapping

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.