jmstate.utils.plot_mcmc_diagnostics¶
- plot_mcmc_diagnostics(model, *, figsize=(8, 4))[source]¶
Visualize the evolution of MCMC diagnostics during fitting.
This function generates two subplots showing the mean acceptance rate and mean step size across iterations.
- Parameters:
model (MultiStateJointModel) – The fitted model whose MCMC diagnostics are to be plotted.
figsize (tuple[int, int], optional) – Figure dimensions (width, height). Defaults to (8, 4).
- Raises:
ValueError – If the model sampler is None or the diagnostics have fewer than two recorded values.
- Returns:
- A tuple containing the matplotlib Figure
object and a flattened array of Axes objects corresponding to the subplots.
- Return type:
tuple[plt.Figure, np.ndarray]