petab.visualize.plot_residuals

Functions for plotting residuals.

Functions

plot_goodness_of_fit(petab_problem, ...[, ...])

Plot goodness of fit.

plot_residuals_vs_simulation(petab_problem, ...)

Plot residuals versus simulation values for measurements with normal noise assumption.

petab.visualize.plot_residuals.plot_goodness_of_fit(petab_problem: Problem, simulations_df: str | Path | DataFrame, size: Tuple = (10, 7), ax: Axes | None = None) Axes[source]

Plot goodness of fit.

Parameters:
  • petab_problem – A PEtab problem.

  • simulations_df – A simulation DataFrame in the PEtab format or path to the simulation output data file.

  • size – Figure size.

  • ax – Axis object.

Returns:

ax

Return type:

Axis object of the created plot.

petab.visualize.plot_residuals.plot_residuals_vs_simulation(petab_problem: Problem, simulations_df: str | Path | DataFrame, size: Tuple | None = (10, 7), axes: Tuple[Axes, Axes] | None = None) Axes[source]

Plot residuals versus simulation values for measurements with normal noise assumption.

Parameters:
  • petab_problem – A PEtab problem.

  • simulations_df – A simulation DataFrame in the PEtab format or path to the simulation output data file.

  • size – Figure size.

  • axes – Axis object.

Returns:

ax

Return type:

Axis object of the created plot.