Learn R Programming

deepregression (version 2.2.0)

layer_generator: Function that creates layer for each processor

Description

Function that creates layer for each processor

Usage

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" )

Value

a basic processor list structure

Arguments

term

character; term in the formula

output_dim

integer; number of units in the layer

param_nr

integer; identifier for models with more than one additive predictor

controls

list; control arguments which allow to pass further information

name

character; name of layer. if NULL, makelayername will be used to create layer name

layer_class

a tf or keras layer function

without_layer

function to be used as layer if controls$with_layer is FALSE

further_layer_args

named list; further arguments passed to the layer

layer_args_names

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.

units

integer; number of units for layer

engine

character; the engine which is used to setup the NN (tf or torch)

...

other keras layer parameters

data

data frame; the data used in processors