SFI.diagnostics.plotting module

Diagnostic plotting helpers.

Three panels covering the common visual checks of a fitted inference object:

All helpers accept either a fitted inference object (calling assess() internally) or a pre-computed DiagnosticsReport.

Plots use the SFI palette (SFI.utils.plotting.SFI_COLORS) but do not call apply_style() — applying the gallery style is the caller’s responsibility (see GALLERY_STYLE_GUIDE.md).

SFI.diagnostics.plotting.plot_dynamics_order(report, *, axes=None)[source]

Visualise an OD-vs-UD classification (classify_dynamics()).

Two panels versus the sampling step dt:

  • lag-2 persistence rho2 = C2/(C0+2C1) (noise-immune): tends to 0 for overdamped data, to a positive plateau for inertia;

  • apparent kinetic energy K = (C0+2C1)/dt^2 on log-log axes, with reference slopes -1 (overdamped, K ~ 2D/dt) and 0 (underdamped); the fitted log-log slope beta is annotated.

The parametric-fit prediction is overlaid on both panels. Accepts a DynamicsOrderReport.

SFI.diagnostics.plotting.plot_qq(report_or_inferer, *, ax=None, level='standard')[source]

Normal Q–Q plot of pooled whitened residuals.

Parameters:

level (str)

SFI.diagnostics.plotting.plot_residual_acf(report_or_inferer, *, ax=None, level='standard')[source]

Autocorrelation of the residuals (and of $z^2$).

Reads the ACF computed by autocorrelation_tests() (stored on the report) rather than recomputing it.

Parameters:

level (str)

SFI.diagnostics.plotting.plot_residual_histogram(report_or_inferer, *, ax=None, bins=60, level='standard')[source]

Histogram of pooled residuals overlaid with N(0,1) density.

Parameters:
  • bins (int)

  • level (str)

SFI.diagnostics.plotting.plot_summary(report_or_inferer, *, level='standard', figsize=(13.0, 4.0))[source]

1×3 summary figure: Q–Q plot, residual histogram, and ACF.

Returns the matplotlib Figure.

Parameters:

level (str)