|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatalign.base.thread.Stoppable
statalign.base.Mcmc
public class Mcmc
This class handles an MCMC run. The class extends Stoppable, it may be terminated/suspended in graphical mode.
Field Summary | |
---|---|
boolean |
burnin
True while the MCMC is in the burn-in phase. |
McmcModule |
coreModel
McmcModule containing the moves for the core components of the model, i.e. the indel parameters, substitution model parameters, alignment, topology and edge lengths. |
boolean |
firstHalfBurnin
True while the MCMC is in the first half of burn-in phase. |
MCMCPars |
mcmcpars
MCMC parameters including the number of burn-in steps, the total number of steps in the MCMC and the sampling rate. |
McmcStep |
mcmcStep
|
ModelExtManager |
modelExtMan
Manager that handles model extension plugins |
CNetwork |
network
|
PostprocessManager |
postprocMan
PostprocessManager that handles the postprocessing modules. |
Tree |
tree
Current tree in the MCMC chain. |
Constructor Summary | |
---|---|
Mcmc(Tree tree,
MCMCPars pars,
PostprocessManager ppm,
ModelExtManager modelExtMan)
|
|
Mcmc(Tree tree,
MCMCPars pars,
PostprocessManager ppm,
ModelExtManager modelExtMan,
int noOfProcesses,
int rank,
double heat)
|
Method Summary | |
---|---|
boolean |
acceptanceDecision(double oldLogLikelihood,
double newLogLikelihood,
double logProposalRatio,
boolean acceptMoveIfPossible)
|
int |
doMCMC()
Starts an MCMC run. |
java.lang.String |
getInfoString()
Returns a string representation describing the acceptance ratios of the current MCMC run. |
State |
getState()
Returns a State object that describes the current state of the
MCMC. |
boolean |
isParamChangeAccepted(double logProposalRatio,
McmcMove m)
This function is called by the McmcMove objects in order to determine whether the proposed moves are to be accepted. |
static void |
main2(java.lang.String[] args)
Code to test that various samplers are working correctly. |
static void |
main3(java.lang.String[] args)
Code to test that the moves are being sampled according to the correct weights (i.e. that there is not some bias arising from the choose function and/or random number generator). |
static void |
main4(java.lang.String[] args)
|
static void |
main5(java.lang.String[] args)
|
Methods inherited from class statalign.base.thread.Stoppable |
---|
pausable, stoppable |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public CNetwork network
public Tree tree
public MCMCPars mcmcpars
public McmcStep mcmcStep
public PostprocessManager postprocMan
public ModelExtManager modelExtMan
public McmcModule coreModel
public boolean burnin
public boolean firstHalfBurnin
Constructor Detail |
---|
public Mcmc(Tree tree, MCMCPars pars, PostprocessManager ppm, ModelExtManager modelExtMan)
public Mcmc(Tree tree, MCMCPars pars, PostprocessManager ppm, ModelExtManager modelExtMan, int noOfProcesses, int rank, double heat)
Method Detail |
---|
public boolean isParamChangeAccepted(double logProposalRatio, McmcMove m)
logProposalRatio
- This also includes the contribution from the prior densities.
It is assumed that any dependencies between the priors and other parameters will be
handled inside the McmcMove objects.
public boolean acceptanceDecision(double oldLogLikelihood, double newLogLikelihood, double logProposalRatio, boolean acceptMoveIfPossible)
public java.lang.String getInfoString()
public State getState()
State
object that describes the current state of the
MCMC. This can then be passed on to other classes such as postprocessing
plugins.
public int doMCMC()
public static void main5(java.lang.String[] args)
public static void main4(java.lang.String[] args)
public static void main3(java.lang.String[] args)
public static void main2(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |