|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Proposer
Interface for Metropolis-Hastings proposal distributions. A Proposer object must be able to create an initial state for the Markov chain, and propose a new state x' given any state x. It must also be able to compute the proposal ratio q(x | x') / q(x' | x), where q is the proposal distribution.
Implementations of the Proposer interface should have a constructor with two arguments: a blog.Model object defining the prior distribution, and a java.util.Properties object specifying configuration parameters.
Method Summary | |
---|---|
PartialWorldDiff |
initialize(Evidence evidence,
java.util.List queries)
Returns a PartialWorldDiff whose current version serves as the initial state for the Markov chain (its saved version is initially an empty instantiation). |
void |
printStats()
Prints any relevant statistics about the internal behavior of this proposer. |
double |
proposeNextState(PartialWorldDiff proposedWorld)
Proposes a next state for the Markov chain given the current state. |
void |
updateStats(boolean accepted)
Updates any statistics maintained by this proposer to reflect the fact that the most recent proposal was accepted (if accepted is true) or rejected
(if accepted is false). |
Method Detail |
---|
PartialWorldDiff initialize(Evidence evidence, java.util.List queries)
proposeNextState
can also
maintain these properties.
queries
- List of Query objectsdouble proposeNextState(PartialWorldDiff proposedWorld)
The proposed world satisfies the evidence and is complete enough
to answer the queries specified in the last call to
initialize
.
Note that if this proposal distribution is a mixture or cycle of
more elementary proposal distributions, the proposal probabilities
q(x | x') and q(x' | x) may be specific to the elementary distribution
used for this proposal.
java.lang.IllegalStateException
- if initialize
has not been calledvoid printStats()
void updateStats(boolean accepted)
accepted
is true) or rejected
(if accepted
is false).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |