clophfit.fitting.diagnostic_plots#
Reusable matplotlib-only diagnostic plots for standardized residuals.
These plots are independent of seaborn and are suitable for both package tests and manuscript workflows.
Functions#
|
Create a generic standardized-residual diagnostic overview. |
Module Contents#
- clophfit.fitting.diagnostic_plots.plot_residual_overview(residuals, *, residual_col='std_res', x_col='x', label_col='label', well_col='well', step_col='step', output_path=None, title=None, bins=40, alpha=0.45)#
Create a generic standardized-residual diagnostic overview.
Panels: (A) distribution, (B) residuals vs
x, (C) lag-1 correlation histograms, (D) normal Q-Q plot. Uses ±2 visual guides.The residual column should contain model-standardized residuals:
std_res = (observed - predicted) / sigma_used_in_fit
not a global z-score of raw residuals.
- Parameters:
residuals (pandas.DataFrame)
residual_col (str)
x_col (str)
label_col (str)
well_col (str)
step_col (str)
output_path (str | pathlib.Path | None)
title (str | None)
bins (int)
alpha (float)
- Return type:
matplotlib.figure.Figure