Specialization of cc.
This method must be implemented in concrete subclasses.
This method must be implemented in concrete subclasses. It should return the log of the ratio of backwards-to-forwards jump probabilities.
Called whenever we accept a proposal that results in the best configuration seen so far.
Called whenever we accept a proposal that results in the best configuration seen so far. If you override, you must call super.bestConfigHook!
The number of calls to process that resulted in a change (a non-empty DiffList)
The number of calls to process that resulted in a change (a non-empty DiffList)
The number of calls to process(numIterations:Int) or process(contexts:C,numIterations:Int).
The number of calls to process(numIterations:Int) or process(contexts:C,numIterations:Int).
If true, calls to "newDiffList" will create a new DiffList to describe the changes they made, otherwise "newDiffList" will return null.
If true, calls to "newDiffList" will create a new DiffList to describe the changes they made, otherwise "newDiffList" will return null.
In your implementation of "process1" use this method to optionally create a new DiffList, obeying "makeNewDiffList".
In your implementation of "process1" use this method to optionally create a new DiffList, obeying "makeNewDiffList".
Convenient method for setting makeNewDiffList to false, and returning this.
Convenient method for setting makeNewDiffList to false, and returning this.
If you want the Proposals to actually contain the objectiveScore, override this method appropriately.
If you want the Proposals to actually contain the objectiveScore, override this method appropriately. Used for training.
Called after accepting the proposed change.
Called after accepting the proposed change. If you override, you must call super.postAcceptanceHook!
Called after each iteration of sampling the full list of variables.
Called after each iteration of sampling the full list of variables. Return false if you want sampling to stop early.
Call just after each step of sampling.
Call just after each step of sampling.
Called just after making the proposed change.
Called just after making the proposed change. If you override, you must call super.postProposalHook!
Called just after undoing the proposed change.
Called just after undoing the proposed change. If you override, you must call super.postUndoHook!
Called just before each step of sampling.
Called just before each step of sampling. Return an alternative variable if you want that one sampled instead. Return null if you want to abort sampling of this context.
Called just before making the proposed change.
Called just before making the proposed change. If you override, you must call super.preProposalHook!
Do one step of sampling.
Do one step of sampling. This is a method intended to be called by users. It manages hooks and processCount.
The underlying protected method that actually does the work.
The underlying protected method that actually does the work. Use this.newDiffList to optionally create returned DiffList. Needs to be defined in subclasses.
The number of calls to process(context:C)
The number of calls to process(context:C)
A Metropolis-Hastings sampler. The abstract method 'propose' should be defined to make a random proposal, putting changes in its implicit DiffList, and returning the log ratio of q/q' (backward to forward jump probabilities.)
0.8
GibbsSampler
ProposalSampler