CurrentModule = Pigeons
During the execution of parallel tempering, interim diagnostics
can be computed and printed to standard out at the end of every iteration (this can be disabled using show_report = false
):
using Pigeons
pigeons(target = toy_mvn_target(100))
nothing # hide
The functions called to emit each of these can
be found at all_reports()
. Some key quantities:
Λ
: the global communication barrier, as described in Syed et al., 2021 and estimated using the sum of rejection estimator analyzed in the same reference. Syed et al., 2021 also developed a rule of thumb to configure the number of chains: PT should be set to roughly 2Λ.time
andallc
: the time (in second) and allocation (in bytes) used in each round.log(Z₁/Z₀)
: thestepping_stone()
estimator for the log of the normalization constant, see [the documentation page on approximation of the normalization constant](@ref output-normalization).min(α)
andmean(α)
: minimum and average swap acceptance rates over the PT chains.
Additional statistics can be shown when more [recorders](@ref collecting-statistics) are added. For example, to accumulate other constant-memory summary statistics:
pigeons(target = toy_mvn_target(100), record = record_online(), explorer = AutoMALA())
nothing # hide
max|ρ|
andmean|ρ|
: maximum and average (across chains) correlation of the random variablesL^t_i = V(X_i)
andL^{t+1}_i = V(X_i)
whereV = \log \pi_N / \pi_1
,X_i \sim \pi_{\beta_i}
, andt, t+1
are indices just before and after a call tostep!()
.min(αₑ)
andmean(αₑ)
: minimum and average (across chains) of the explorer's acceptance rates.
The tables described above can also be accessed as a DataFrame
via:
using Pigeons
pt = pigeons(target = toy_mvn_target(100))
pt.shared.reports.summary
Detailed statistics can be accessed via these DataFrames. For example to obtain mean swap acceptance probabilities for each round and pair of communicating chains, use:
first(pt.shared.reports.swap_prs, 20)
Creating a plot from this:
using StatsPlots
plotlyjs()
my_plot = @df pt.shared.reports.swap_prs StatsPlots.plot(:round, :mean, group = :first)
StatsPlots.savefig(my_plot, "swap_prs.html");
nothing # hide
<iframe src="../swap_prs.html" style="height:500px;width:100%;"></iframe>