org.omegahat.Simulation.MCMC.Proposals
Class KernelDirectionSampler
java.lang.Object
|
+--org.omegahat.Simulation.MCMC.Proposals.KernelDirectionSampler
- All Implemented Interfaces:
- HastingsCoupledProposal
- public class KernelDirectionSampler
- extends java.lang.Object
- implements HastingsCoupledProposal
Method Summary |
void |
computeEdgePoints(double[] X1,
double[] X2,
double[] min,
double[] max)
|
protected void |
computeWeights(double[][] sample,
MultiState currentState,
int which)
|
double |
conditionalPDF(java.lang.Object state,
java.lang.Object conditions,
int which,
MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector |
java.lang.Object |
generate(java.lang.Object currentComponent,
int which,
MultiState currentState)
Generate a new component state given the entire state vector |
double[][] |
generateSample(double[] X1,
double[] X2,
double[] min,
double[] max)
|
(package private) int |
getNumPoints()
|
(package private) double[][] |
getProposalVar()
|
(package private) double[][] |
getProposalVar(double[][] var)
|
(package private) boolean |
isOnLine(double[] point,
double[] X1,
double[] X2)
|
double |
logConditionalPDF(java.lang.Object state,
java.lang.Object conditions,
int which,
MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector |
double |
logTransitionProbability(java.lang.Object from,
java.lang.Object to,
int which,
MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector |
(package private) int |
setNumPoints(int num)
|
double |
transitionProbability(java.lang.Object from,
java.lang.Object to,
int which,
MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector |
protected void |
wipeFields()
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
DEBUG
public boolean DEBUG
numPoints
protected int numPoints
proposalVar
protected double[][] proposalVar
normal
protected MVNormal normal
prng
protected PRNG prng
EPSILON
protected static double EPSILON
X1
protected double[] X1
X2
protected double[] X2
Y
protected double[] Y
sample
protected double[][] sample
weightsWithX1
protected double[] weightsWithX1
weightsWithoutX1
protected double[] weightsWithoutX1
weightsWithY
protected double[] weightsWithY
Yindex
protected int Yindex
lowerEdge
double[] lowerEdge
upperEdge
double[] upperEdge
KernelDirectionSampler
public KernelDirectionSampler(int numPoints,
double[][] var,
PRNG prng)
getNumPoints
int getNumPoints()
setNumPoints
int setNumPoints(int num)
getProposalVar
double[][] getProposalVar()
getProposalVar
double[][] getProposalVar(double[][] var)
wipeFields
protected void wipeFields()
conditionalPDF
public double conditionalPDF(java.lang.Object state,
java.lang.Object conditions,
int which,
MultiState stateVector)
- Description copied from interface:
HastingsCoupledProposal
- Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
- Specified by:
conditionalPDF
in interface HastingsCoupledProposal
- Following copied from interface:
org.omegahat.Simulation.MCMC.HastingsCoupledProposal
- Parameters:
conditions
- Current value of the component state being updatedstate
- Proposed state of the component state being updatedwhich
- index of the component state being updatedstateVector
- entire set of states, including the state being updated
logConditionalPDF
public double logConditionalPDF(java.lang.Object state,
java.lang.Object conditions,
int which,
MultiState stateVector)
- Description copied from interface:
HastingsCoupledProposal
- Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
- Specified by:
logConditionalPDF
in interface HastingsCoupledProposal
- Following copied from interface:
org.omegahat.Simulation.MCMC.HastingsCoupledProposal
- Parameters:
conditions
- Current value of the component state being updatedstate
- Proposed state of the component state being updatedwhich
- index of the component state being updatedstateVector
- entire set of states, including the state being updated
transitionProbability
public double transitionProbability(java.lang.Object from,
java.lang.Object to,
int which,
MultiState stateVector)
- Description copied from interface:
HastingsCoupledProposal
- Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
- Specified by:
transitionProbability
in interface HastingsCoupledProposal
- Following copied from interface:
org.omegahat.Simulation.MCMC.HastingsCoupledProposal
- Parameters:
from
- Current value of the component state being updatedto
- Proposed state of the component state being updatedwhich
- index of the component state being updatedstateVector
- entire set of states, including the state being updated
logTransitionProbability
public double logTransitionProbability(java.lang.Object from,
java.lang.Object to,
int which,
MultiState stateVector)
- Description copied from interface:
HastingsCoupledProposal
- Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
- Specified by:
logTransitionProbability
in interface HastingsCoupledProposal
- Following copied from interface:
org.omegahat.Simulation.MCMC.HastingsCoupledProposal
- Parameters:
from
- Current value of the component state being updatedto
- Proposed state of the component state being updatedwhich
- index of the component state being updatedstateVector
- entire set of states, including the state being updated
isOnLine
boolean isOnLine(double[] point,
double[] X1,
double[] X2)
generate
public java.lang.Object generate(java.lang.Object currentComponent,
int which,
MultiState currentState)
- Description copied from interface:
HastingsCoupledProposal
- Generate a new component state given the entire state vector
- Specified by:
generate
in interface HastingsCoupledProposal
- Following copied from interface:
org.omegahat.Simulation.MCMC.HastingsCoupledProposal
- Parameters:
conditions
- Current value of the component state being updatedwhich
- index of the component state being updatedstateVector
- entire set of states, including the state being updated
computeEdgePoints
public void computeEdgePoints(double[] X1,
double[] X2,
double[] min,
double[] max)
generateSample
public double[][] generateSample(double[] X1,
double[] X2,
double[] min,
double[] max)
computeWeights
protected void computeWeights(double[][] sample,
MultiState currentState,
int which)