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, _E=None)[source]#
Run Automatic Model Development (AMD) tool
- Parameters:
input (Model, Path or DataFrame) – Starting model or 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’, ‘SIR’, ‘SRI’, and ‘RSI’.
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 and covariate 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. This option is deprecated. Please use ALLOMETRY in the mfl instead.
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
_E (dict) – EXPERIMENTAL FEATURE. Dictionary of different E-values used in mBIC.
- Returns:
AMDResults – Results for the run
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") >>> res = run_amd(model, results=results)
See also
run_iiv
,run_tool