run_amd#

pharmpy.tools.run_amd(input, results=None, modeltype='basic_pk', administration='oral', strategy='default', cl_init=None, vc_init=None, mat_init=None, b_init=None, emax_init=None, ec50_init=None, met_init=None, search_space=None, lloq_method=None, lloq_limit=None, allometric_variable=None, occasion=None, path=None, resume=False, strictness='minimization_successful or (rounding_errors and sigdigs>=0.1)', dv_types=None, mechanistic_covariates=None, retries_strategy='all_final', seed=None, parameter_uncertainty_method=None, ignore_datainfo_fallback=False)[source]#

Run Automatic Model Development (AMD) tool

Parameters:
  • input (Model or Path) – Read model object/Path to a dataset

  • results (ModelfitResults) – Reults of input if input is a model

  • modeltype (str) – Type of model to build. Valid strings are ‘basic_pk’, ‘pkpd’, ‘drug_metabolite’ and ‘tmdd’

  • administration (str) – Route of administration. Either ‘iv’, ‘oral’ or ‘ivoral’

  • strategy (str) – Run algorithm for AMD procedure. Valid options are ‘default’, ‘reevaluation’. Default is ‘default’

  • cl_init (float) – Initial estimate for the population clearance

  • vc_init (float) – Initial estimate for the central compartment population volume

  • mat_init (float) – Initial estimate for the mean absorption time (not for iv models)

  • b_init (float) – Initial estimate for the baseline (PKPD model)

  • emax_init (float) – Initial estimate for E_max (PKPD model)

  • ec50_init (float) – Initial estimate for EC_50 (PKPD model)

  • met_init (float) – Initial estimate for mean equilibration time (PKPD model)

  • search_space (str) – MFL for search space for structural model

  • lloq_method (str) – Method for how to remove LOQ data. See transform_blq for list of available methods

  • lloq_limit (float) – Lower limit of quantification. If None LLOQ column from dataset will be used

  • allometric_variable (str or Symbol) – Variable to use for allometry

  • occasion (str) – Name of occasion column

  • path (str or Path) – Path to run AMD in

  • resume (bool) – Whether to allow resuming previous run

  • strictness (str or None) – Strictness criteria

  • dv_types (dict or None) – Dictionary of DV types for TMDD models with multiple DVs.

  • mechanistic_covariates (list) – List of covariates or tuple of covariate and parameter combination to run in a separate proioritized covsearch run. For instance [“WT”, (“CRCL”, “CL”)]. The effects are extracted from the search space for covsearch.

  • retries_strategy (str) – Whether or not to run retries tool. Valid options are ‘skip’, ‘all_final’ or ‘final’. Default is ‘final’.

  • seed (int or rng) – Random number generator or seed to be used.

  • parameter_uncertainty_method ({‘SANDWICH’, ‘SMAT’, ‘RMAT’, ‘EFIM’} or None) – Parameter uncertainty method.

  • ignore_datainfo_fallback (bool) – Ignore using datainfo to get information not given by the user. Default is False

Returns:

Model – Reference to the same model object

Examples

>>> from pharmpy.modeling import *
>>> from pharmpy.tools import run_amd, load_example_modelfit_results
>>> model = load_example_model("pheno")
>>> results = load_example_modelfit_results("pheno")
>>> run_amd(model, results=results)      

See also

run_iiv, run_tool