run_modelsearch#

pharmpy.modeling.run_modelsearch(search_space, algorithm, iiv_strategy='no_add', rankfunc='bic', cutoff=None, model=None)#

Run Modelsearch tool. For more details, see Modelsearch.

Parameters
  • search_space (str) – Search space to test

  • algorithm (str) – Algorithm to use (e.g. exhaustive)

  • iiv_strategy (str) – If/how IIV should be added to candidate models. Possible strategies are ‘no_add’, ‘diagonal’, ‘fullblock’, or ‘absorption_delay’. Default is ‘no_add’

  • rankfunc (str) – Which ranking function should be used (OFV, AIC, BIC). Default is BIC

  • cutoff (float) – Cutoff for which value of the ranking function that is considered significant. Default is None (all models will be ranked)

  • model (Model) – Pharmpy model

Returns

ModelSearchResults – Modelsearch tool result object

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> run_modelsearch('ABSORPTION(ZO);PERIPHERALS(1)', 'exhaustive', model=model)