deeptransformation_init: Initializing Deep Transformation Models

View source: R/deepregression.R

deeptransformation_initR Documentation

Initializing Deep Transformation Models

Description

Initializing Deep Transformation Models

Usage

deeptransformation_init(
  n_obs,
  ncol_structured,
  ncol_deep,
  list_structured,
  list_deep,
  lambda_lasso = NULL,
  lambda_ridge = NULL,
  weights = NULL,
  learning_rate = 0.01,
  optimizer = optimizer_adam(lr = learning_rate),
  monitor_metric = list(),
  orthog_fun = orthog,
  orthogX = NULL,
  split_fun = split_model,
  order_bsp,
  use_bias_in_structured = FALSE,
  train_together = NULL,
  split_between_shift_and_theta = NULL,
  interact_pred_trafo = NULL,
  addconst_interaction = NULL,
  penalize_bsp = 0,
  order_bsp_penalty = 2,
  base_distribution = "normal",
  batch_shape = NULL,
  atm_lags = 0,
  atm_toplayer = NULL
)

Arguments

n_obs

number of observations

ncol_structured

a vector of length #parameters defining the number of variables used for each of the parameters. If any of the parameters is not modelled using a structured part the corresponding entry must be zero.

ncol_deep

a vector of length #parameters defining the number of variables used for each of the parameters. If any of the parameters is not modelled using a deep part the corresponding entry must be zero. If all parameters are estimated by the same deep model, the first entry must be non-zero while the others must be zero.

list_structured

list of (non-linear) structured layers (list length between 0 and number of parameters)

list_deep

list of deep models to be used (list length between 0 and number of parameters)

lambda_lasso

penalty parameter for l1 penalty of structured layers

lambda_ridge

penalty parameter for l2 penalty of structured layers

weights

observation weights used in the likelihood

learning_rate

learning rate for optimizer

optimizer

optimizer used (defaults to adam)

monitor_metric

see ?deepregression

orthog_fun

function defining the orthogonalization

orthogX

vector of columns defining the orthgonalization layer

split_fun

see ?deepregression

order_bsp

NULL or integer; order of Bernstein polynomials; if not NULL, a conditional transformation model (CTM) is fitted.

use_bias_in_structured

whether or not to use a bias in structured layers

train_together

see ?deepregression

split_between_shift_and_theta

see ?deepregression

interact_pred_trafo

specifies a transformation function applied to the interaction predictor using a layer lambda (e.g. to ensure positivity)

addconst_interaction

additive constant added to predictor matrix to ensure positivity

penalize_bsp

scalar value > 0; amount of penalization of Bernstein polynomials

order_bsp_penalty

integer; order of Bernstein polynomial penalty. 0 results in a penalty based on integrated squared second order derivatives, values >= 1 in difference penalties

base_distribution

a string ("normal", "logistic") or TFP distribution; the base distribution for the transformation model. Per default tfd_normal(loc = 0, scale = 1) but any other distribution is possible (e.g., tfd_logistic(loc = 0, scale = 1)).


davidruegamer/deepregression documentation built on May 30, 2022, 6:21 p.m.