Learn R Programming

pmxNODE (version 0.1.0)

ind_der_state_plot_nlmixr: Generate Derivative versus State Plot for individual parameter estimates (nlmixr2)

Description

This functions allows to generate a derivative versus state plot for a neural network from a NODE in nlmixr2 with individual parameter estimates (EBEs).

Usage

ind_der_state_plot_nlmixr(
  nn_name,
  min_state = NULL,
  max_state = NULL,
  inputs = NULL,
  est_parms = NULL,
  fit_obj = NULL,
  length_out = 100,
  time_nn = FALSE,
  ribbon = TRUE,
  act = "ReLU",
  beta = 20
)

Value

Displaying derivative versus state plot

Arguments

nn_name

(string) Name of the NN, e.g., “c” for NNc(...)

min_state

(numeric) Value of minimal state for which the derivative should be calculated (optional if inputs is given, ignored if inputs is defined)

max_state

(numeric) Value of maximal state for which the derivative should be calculated (optional if inputs is given, ignored if inputs is defined)

inputs

(numeric vector) Vector of input values for which derivatives should be calculated (optional if min_state and max_state is given)

est_parms

(named vector; semi-optional) A data frame with estimated individual parameters from the NN extracted through the indparm_extractor_nlmixr function. For optionality, see Details.

fit_obj

(nlmixr fit object; semi-optional) The fit-object from nlmixr2(...), fitted with IIV. For optionality, see Details.

length_out

(numeric) Number of points between min_state and max_state

time_nn

(boolean) Whether the neural network to analyze is a time-dependent neural network or not. Default values is FALSE.

ribbon

(boolean) Whether individual derivatives versus states should be summarise in a ribbon (TRUE) or displayed as individual spaghetti plot (FALSE)

act

(string) Activation function used in the NN. Currently "ReLU" and "Softplus" available.

beta

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

Author

Dominic Bräm

Details

Either est_parms or fit_obj must be given. If both arguments are given, est_parms is prioritized.

Examples

Run this code
if (FALSE) {
ind_fit <- nlmxir2(node_model_ind,data=data,est="saem")
der_state_plot <- ind_der_state_plot_nlmixr(nn="c",min_state=0,max_state=10,
                                            fit_obj=ind_fit)
}

Run the code above in your browser using DataLab