Function that creates layer for each processor
layer_generator(
term,
output_dim,
param_nr,
controls,
name = makelayername(term, param_nr),
layer_class = tf$keras$layers$Dense,
without_layer = tf$identity,
further_layer_args = NULL,
layer_args_names = NULL,
units = as.integer(output_dim),
engine = "tf",
...
)int_processor(term, data, output_dim, param_nr, controls, engine = "tf")
lin_processor(term, data, output_dim, param_nr, controls, engine = "tf")
ri_processor(term, data, output_dim, param_nr, controls, engine)
gam_processor(term, data, output_dim, param_nr, controls, engine = "tf")
autogam_processor(term, data, output_dim, param_nr, controls, engine = "tf")
node_processor(
term,
data,
output_dim,
param_nr,
controls = NULL,
engine = "tf"
)
a basic processor list structure
character; term in the formula
integer; number of units in the layer
integer; identifier for models with more than one additive predictor
list; control arguments which allow to pass further information
character; name of layer.
if NULL, makelayername
will be used to create layer name
a tf or keras layer function
function to be used as
layer if controls$with_layer
is FALSE
named list; further arguments passed to the layer
character vector; if NULL, default layer args will be used. Needs to be set for layers that do not provide the arguments of a default Dense layer.
integer; number of units for layer
character; the engine which is used to setup the NN (tf or torch)
other keras layer parameters
data frame; the data used in processors