Change so that proposals represent a configuration of a proposal distribution, rather than a proposal conditional on the initial value.
An instance of DiscreteVariableProposal(some_config) is now a particular proposal distribution q(.|.), whereas before an instance of DiscreteVariableProposal(x) represented a proposal conditional on the starting value q(.|x). This will enable user-configuration of e.g. move probabilities (and potentially tuning of move probabilities by an as-yet-unspecified "proposal-generator"). This will also facilitate some refactoring I think needs to happen to enable reversible jump and HINTS to be integrated smoothly.
Each of the types in discretesampling/base/types is now an abstract base class, which better reflects their intended purpose. Some methods are concrete (and can be overridden by subclasses where appropriate), others are abstract and must be implemented by subclasses.
Constructors of DiscreteVariableProposal now do not take as input the starting value x. Instead they can (optionally) be configured to modify the behaviour of the proposal distribution, e.g. specifying move probabilities. The constructor might specify some sensible defaults that the user can override.
.sample now takes starting value x as input and outputs a sample x':
x_prime = proposal.sample(x)
.eval now takes starting value x and end value x' and outputs log probability of transition from x to x':
forward_log_prob = proposal.sample(x, x_prime)
Edited tests and SMC/MCMC accordingly to match above
Change so that proposals represent a configuration of a proposal distribution, rather than a proposal conditional on the initial value.
An instance of DiscreteVariableProposal(some_config) is now a particular proposal distribution q(.|.), whereas before an instance of DiscreteVariableProposal(x) represented a proposal conditional on the starting value q(.|x). This will enable user-configuration of e.g. move probabilities (and potentially tuning of move probabilities by an as-yet-unspecified "proposal-generator"). This will also facilitate some refactoring I think needs to happen to enable reversible jump and HINTS to be integrated smoothly.
Each of the types in
discretesampling/base/types
is now an abstract base class, which better reflects their intended purpose. Some methods are concrete (and can be overridden by subclasses where appropriate), others are abstract and must be implemented by subclasses.Constructors of DiscreteVariableProposal now do not take as input the starting value x. Instead they can (optionally) be configured to modify the behaviour of the proposal distribution, e.g. specifying move probabilities. The constructor might specify some sensible defaults that the user can override.
.sample now takes starting value x as input and outputs a sample x':
.eval now takes starting value x and end value x' and outputs log probability of transition from x to x':
Edited tests and SMC/MCMC accordingly to match above