SFI.diagnostics.plotting module¶
Diagnostic plotting helpers.
Three panels covering the common visual checks of a fitted inference object:
plot_qq()— normal Q–Q plot of pooled whitened residuals;plot_residual_histogram()— histogram of pooled residuals overlaid with the standard normal density;plot_residual_acf()— autocorrelation of the residuals (and of their squares) with the±1.96/√nband;plot_summary()— a 1×3 figure combining the three panels.
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^2on log-log axes, with reference slopes-1(overdamped,K ~ 2D/dt) and0(underdamped); the fitted log-log slopebetais 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)