Learn R Programming

pmxNODE (version 0.1.0)

nn_generator_mlx: Internal: Generate NN code for Monolix

Description

Generate the explicit code for a NN in Monolix

Usage

nn_generator_mlx(
  number,
  state,
  n_hidden = 5,
  act = "ReLU",
  time_nn = FALSE,
  beta = 20
)

Value

Explicit NN code in Monolix as list of lines in Monolix model file

Arguments

number

(string) Name of the NN

state

(string) State to be used as input of the NN

n_hidden

(numeric) Number of units in the hidden layer; currently not implemented for the NN function

act

(string) Activation function to be used in the hidden layer of the NN (currently ReLU and Softplus implemented), default is ReLU

time_nn

(boolean) If NN should be set up specifically as a time-dependent NN with strictly negative weights from input to hidden layer through w'=-w^2

beta

(numeric) Beta value for the Softplus activation function, only applicable if act="Softplus"; Default to 20.

Author

Dominic Bräm

Details

Structure of one unit in the hidden layer:
h1 = max(0,W1 * state + b1)
h2 = max(0,W2 * state + b2)
...
NN = h1 + h2 + ...