plot_re_acceptance¶
- jaxrens.postprocess.plotting.plot_re_acceptance(monitor_or_trace, *, ax=None, per_pair=True, window=None, label_prefix='', **kwargs)[source]¶
Plot inter-replica swap acceptance rate vs iteration.
Per-fire per-pair acceptance comes from the RE trace (loaded from
<prefix>.re_stats.h5). Whenper_pair=True(default), draws one line per adjacent replica pair. Whenper_pair=False, plots the mean across pairs with a shadedfill_betweenfor ±1 std.Per-fire values are 0/1 noisy for
n_swap_cycles=1runs. Passwindow=Wto apply a centred boxcar average of widthWto each pair’s trace before plotting.- Parameters:
monitor_or_trace – A populated Monitor with a non-None
re_traceor anRELoginstance directly.ax (Axes | None) – Existing axes to plot into. Created if None.
per_pair (bool) – If True, draw one line per adjacent replica pair. Otherwise plot mean ± std across pairs.
window (int | None) – Optional boxcar smoothing window length (in fire entries).
label_prefix (str) – Prefix prepended to the legend label when
per_pair=False(used by the CLI plot dispatcher).**kwargs – Forwarded to
ax.plot.
- Returns:
The Axes object.
- Raises:
ValueError – If no RE trace can be resolved or it has zero pairs.
- Return type:
Axes