org.omegahat.Simulation.MCMC
Class BoundedHastingsCoupledSampler
java.lang.Object
|
+--org.omegahat.Simulation.MCMC.NotifyingMCMCObject
|
+--org.omegahat.Simulation.MCMC.BaseMarkovChain
|
+--org.omegahat.Simulation.MCMC.CustomMarkovChain
|
+--org.omegahat.Simulation.MCMC.CustomHastingsCoupledSampler
|
+--org.omegahat.Simulation.MCMC.BoundedHastingsCoupledSampler
- All Implemented Interfaces:
- HastingsCoupledSampler, MarkovChain, NotifyingObject, java.lang.Runnable
- Direct Known Subclasses:
- BoundedHastingsCoupledMaximizer
- public class BoundedHastingsCoupledSampler
- extends CustomHastingsCoupledSampler
This extends CustomHastingsCoupledSampler
by allowing boundaries to be set for each
dimension. If a proposal generates a point outside the boundaries, the proposal is rejected.
Fields inherited from class org.omegahat.Simulation.MCMC.CustomHastingsCoupledSampler |
accepted, DEBUG, detailed, index, log_p_X, log_p_Y, log_q_X_to_Y, log_q_Y_to_X, logAcceptProb, numAccepted, numProposed, numSamplers, order, prng, proposal, state, target, uniformRand |
Constructor Summary |
BoundedHastingsCoupledSampler(MultiState state,
int numSamplers,
UnnormalizedDensity target,
HastingsCoupledProposal proposal,
double[] minVals,
double[] maxVals,
PRNG prng)
|
BoundedHastingsCoupledSampler(MultiState state,
int numSamplers,
UnnormalizedDensity target,
HastingsCoupledProposal proposal,
PRNG prng,
double[] minVals,
double[] maxVals,
boolean detailed)
|
Methods inherited from class org.omegahat.Simulation.MCMC.CustomHastingsCoupledSampler |
generate, getNumAccepted, getNumProposed, getNumSamplers, getProposal, getState, getTarget, initialize, iterate, permute, resetNumAccepted, resetNumProposed, setNumSamplers, setProposal, setState, setTarget, step |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
minVals
protected double[] minVals
maxVals
protected double[] maxVals
BoundedHastingsCoupledSampler
public BoundedHastingsCoupledSampler(MultiState state,
int numSamplers,
UnnormalizedDensity target,
HastingsCoupledProposal proposal,
PRNG prng,
double[] minVals,
double[] maxVals,
boolean detailed)
BoundedHastingsCoupledSampler
public BoundedHastingsCoupledSampler(MultiState state,
int numSamplers,
UnnormalizedDensity target,
HastingsCoupledProposal proposal,
double[] minVals,
double[] maxVals,
PRNG prng)
getMinVals
public double[] getMinVals()
setMinVals
public double[] setMinVals(double[] mins)
getMaxVals
public double[] getMaxVals()
setMaxVals
public double[] setMaxVals(double[] maxs)
acceptanceProb
protected double acceptanceProb(java.lang.Object current,
MultiState currentStateVector,
java.lang.Object proposed,
MultiState proposedStateVector,
int which)
- Overrides:
acceptanceProb
in class CustomHastingsCoupledSampler
logAcceptanceProb
protected double logAcceptanceProb(java.lang.Object current,
MultiState currentStateVector,
java.lang.Object proposed,
MultiState proposedStateVector,
int which)
- Overrides:
logAcceptanceProb
in class CustomHastingsCoupledSampler