Coupling

class telescopic.couplings.Coupling

A coupling of the proposals of two chains under one proposal.

Each chain’s proposal must have exactly the law of the proposal’s sample() from its state, and two chains in equal states must receive identical proposals, with y equal to x, a copy of its rows or x itself, never a recomputation.

abstractmethod couple(target, proposal, state_x, state_y, draws)

Draw the coupled proposals of n pairs.

Parameters:
targetTarget

The target that the chains sample.

proposalProposal

The proposal of both chains, one that supports() accepts.

state_x, state_yState

The first and the second chains of the pairs.

drawsDraws

Random numbers for the n pairs.

Returns:
CoupledProposals
abstractmethod supports(proposal)

Whether this coupling couples proposal, matched by its exact type.

Parameters:
proposalProposal

The proposal to check.

Returns:
bool