Learn R Programming

pmxNODE (version 0.1.0)

nn_generator_nm: Internal: Generate NN code for NONMEM

Description

Generate the explicit code for a NN in NONMEM

Usage

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

Value

Explicit NN code in NONMEM as list of lines in NONMEM 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 = 0
h1_thres = W1 * state + b1
IF (h1_thres.GT.h1) h1 = h1_thres
h2 = 0
...
NN = h1 + h2 + ...