View source: R/deepregression.R
deepregression_init | R Documentation |
Initializing Deep Distributional Regression Models
deepregression_init( n_obs, ncol_structured, ncol_deep, list_structured, list_deep, use_bias_in_structured = FALSE, nr_params = 2, train_together = NULL, lambda_lasso = NULL, lambda_ridge = NULL, family, dist_fun = NULL, variational = TRUE, weights = NULL, learning_rate = 0.01, optimizer = optimizer_adam(lr = learning_rate), monitor_metric = list(), posterior = posterior_mean_field, prior = prior_trainable, orthog_fun = orthog, orthogX = NULL, kl_weight = 1/n_obs, output_dim = 1, mixture_dist = FALSE, split_fun = split_model, ind_fun = function(x) x, extend_output_dim = 0, offset = NULL, additional_penalty = NULL, constraint_fun = NULL, compile_model = TRUE )
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) |
use_bias_in_structured |
logical, whether or not to use a bias in structured layer |
nr_params |
number of distribution parameters |
train_together |
see |
lambda_lasso |
penalty parameter for l1 penalty of structured layers |
lambda_ridge |
penalty parameter for l2 penalty of structured layers |
family |
family specifying the distribution that is modelled |
dist_fun |
a custom distribution applied to the last layer,
see |
variational |
logical value specifying whether or not to use
variational inference. If |
weights |
observation weights used in the likelihood |
learning_rate |
learning rate for optimizer |
optimizer |
optimizer used (defaults to adam) |
monitor_metric |
see |
posterior |
function defining the posterior |
prior |
function defining the prior |
orthog_fun |
function defining the orthogonalization |
orthogX |
vector of columns defining the orthgonalization layer |
kl_weight |
KL weights for variational networks |
output_dim |
dimension of the output (> 1 for multivariate outcomes) |
mixture_dist |
see |
split_fun |
see |
ind_fun |
see |
extend_output_dim |
see |
offset |
list of logicals corresponding to the paramters; defines per parameter if an offset should be added to the predictor |
additional_penalty |
to specify any additional penalty, provide a function
that takes the |
constraint_fun |
function; a constraint for the linear layers |
compile_model |
logical; whether to compile the model (default is TRUE) |
fsbatch_optimizer |
logical; see |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.