run_structsearch#
- pharmpy.tools.run_structsearch(type, model, results, search_space=None, b_init=None, emax_init=None, ec50_init=None, met_init=None, extra_model=None, strictness='minimization_successful or (rounding_errors and sigdigs >= 0.1)', extra_model_results=None, dv_types=None, **kwargs)#
Run the structsearch tool. For more details, see Structsearch.
- Parameters:
type (str) – Type of model. Currently only ‘drug_metabolite’ and ‘pkpd’
search_space (str) – Search space to test
b_init (float) – Initial estimate for the baseline for pkpd models.
emax_init (float) – Initial estimate for E_MAX (for pkpd models only).
ec50_init (float) – Initial estimate for EC_50 (for pkpd models only).
met_init (float) – Initial estimate for MET (for pkpd models only).
results (ModelfitResults) – Results for the start model
model (Model) – Pharmpy start model
extra_model (Model) – Optional extra Pharmpy model to use in TMDD structsearch
extra_model_results (ModelfitResults) – Results for the extra model
strictness (str or None) – Strictness criteria
dv_types (dict) – Dictionary of DV types for TMDD models with multiple DV
kwargs – Arguments to pass to tool
- Returns:
StructSearchResult – structsearch tool result object
Examples
>>> from pharmpy.modeling import * >>> from pharmpy.tools import run_structsearch, load_example_modelfit_results >>> model = load_example_model("pheno") >>> results = load_example_modelfit_results("pheno") >>> run_structsearch(model_type='pkpd', results=results, model=model)