summarize_modelfit_results#
- pharmpy.tools.summarize_modelfit_results(results, include_all_estimation_steps=False)[source]#
Summarize results of model runs
Summarize different results after fitting a model, includes runtime, ofv, and parameter estimates (with errors). If include_all_estimation_steps is False, only the last estimation step will be included (note that in that case, the minimization_successful value will be referring to the last estimation step, if last step is evaluation it will go backwards until it finds an estimation step that wasn’t an evaluation).
- Parameters:
results (list, ModelfitResults) – List of ModelfitResults or single ModelfitResults
include_all_estimation_steps (bool) – Whether to include all estimation steps, default is False
- Returns:
pd.DataFrame – A DataFrame of modelfit results with model name and estmation step as index.
Examples
>>> from pharmpy.modeling import load_example_model >>> from pharmpy.tools import load_example_modelfit_results, summarize_modelfit_results >>> results = load_example_modelfit_results("pheno") >>> df = summarize_modelfit_results(results) >>> df description minimization_successful ... ofv ... runtime_total ... model pheno PHENOBARB SIMPLE MODEL True ... 586.276056 ... 4.0 ...