run_cirt_pcn
run_cirt_pcn(
potential: Callable[[Tensor], Tensor],
dirt: AbstractDIRT,
y: Tensor,int,
n: float = 2.0,
dt: | None = None,
r0: Tensor str = 'first',
subset: bool = True,
verbose: )
Runs a pCN sampler using a conditional of the DIRT mapping.
Runs a pCN sampler to characterise the pullback of the target density under a conditional of 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.
y : Tensor
-
A \(1 \times k\) matrix containing a sample from the approximation domain to condition on.
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 (d-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'
-
Whether
y
is a realisation of the first \(k\) variables (subset='first'
) or the final \(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.