|View source on GitHub|
Estimate thermodynamic integrals using results of ReplicaExchangeMC.
tfp.experimental.mcmc.remc_thermodynamic_integrals( inverse_temperatures, potential_energy, iid_chain_ndims=0 )
Write the density, when tempering with inverse temperature
p_b(x) = exp(-b * U(x)) f(x) / Z_b. Here
Z_b is a normalizing constant,
U(x) is the potential energy. f(x) is the untempered part, if any.
E_b[U(X)] be the expected potential energy when
X ~ p_b. Then,
-1 * integral_c^d E_b[U(X)] db = log[Z_d / Z_c], the log normalizing
Var_b[U(X)] be the variance of potential energy whenX ~ p_b(x)
. Then,integral_c^d Var_b[U(X)] db = E_d[U(X)] - E_c[U(X)]`, the cross entropy
Integration is done via the trapezoidal rule. Assume
Var_b[U(X)] have bounded second derivatives, uniform in
b. Then, the
bias due to approximation of the integral by a summation is
O(1 / K^2).
X ~ p_b has bounded fourth moment, uniform in
further that the swap acceptance rate between every adjacent pair is greater
C_s > 0. If we have
N effective samples from each of the
replicas, then the standard error of the summation is
O(1 / Sqrt(n_replica * N)).