run_irt_pcn
run_irt_pcn(
potential: Callable[[Tensor], Tensor],
dirt: AbstractDIRT,int,
n: float = 2.0,
dt: | None = None,
r0: Tensor str = 'first',
subset: bool = True,
verbose: )
Runs a pCN sampler using the DIRT mapping.
Runs a preconditioned Crank-Nicholson sampler (Cotter et al., 2013) to characterise the pullback of the target density under the DIRT mapping, then pushes the resulting samples forward under the DIRT mapping to obtain samples distributed according to the target. This idea was initially outlined by Cui et al. (2023).
Note that the pCN proposal is only applicable to problems with a Gaussian reference density.
Parameters
potential : Callable[[Tensor], Tensor]
-
A function that returns the negative logarithm of the (possibly unnormalised) target density at a given sample.
dirt : AbstractDIRT
-
A previously-constructed DIRT object.
n : int
-
The length of the Markov chain to construct.
dt : float = 2.0
-
pCN stepsize, \(\Delta t\). If this is not specified, a value of \(\Delta t = 2\) (independence sampler) will be used.
r0 : Tensor | None = None
-
The starting state. This should be a \(1 \times k\) matrix containing a sample from the reference domain. If not passed in, the mean of the reference density will be used.
subset : str = 'first'
-
If the samples contain a subset of the variables, (i.e., \(k < d\)), whether they correspond to the first \(k\) variables (
subset='first'
) or the last \(k\) variables (subset='last'
). verbose : bool = True
-
Whether to print diagnostic information during the sampling process.
Returns
res : MCMCResult
-
An object containing the constructed Markov chain and some diagnostic information.
Notes
When the reference density is the standard Gaussian density (that is, \(\rho(\theta) = \mathcal{N}(0_{d}, I_{d})\)), the pCN proposal (given current state \(\theta^{(i)}\)) takes the form \[ \theta' = \frac{2-\Delta t}{2+\Delta t} \theta^{(i)} + \frac{2\sqrt{2\Delta t}}{2 + \Delta t} \tilde{\theta}, \] where \(\tilde{\theta} \sim \rho(\,\cdot\,)\), and \(\Delta t\) denotes the step size.
When \(\Delta t = 2\), the resulting sampler is an independence sampler. When \(\Delta t > 2\), the proposals are negatively correlated, and when \(\Delta t < 2\), the proposals are positively correlated.
References
Cotter, SL, Roberts, GO, Stuart, AM and White, D (2013). MCMC methods for functions: Modifying old algorithms to make them faster. Statistical Science 28, 424–446.
Cui, T, Dolgov, S and Zahm, O (2023). Scalable conditional deep inverse Rosenblatt transports using tensor trains and gradient-based dimension reduction. Journal of Computational Physics 485, 112103.