statalign.base
Class AutomateParameters

java.lang.Object
  extended by statalign.base.AutomateParameters

public class AutomateParameters
extends java.lang.Object

A class that contains the logic when to stop the burn-in, sampling, or how to determine the sampling rate.

Author:
ingolfur

Field Summary
static double PERCENT_CONST
           
 
Constructor Summary
AutomateParameters()
           
 
Method Summary
static int getSampleRateOfTheSpace(java.util.ArrayList<java.lang.Double> theSpace, int stepSizeOfTheBurnIn)
          Looks either for major decline in theSpace or if we get very close to the average line.
static void setAutomateBurnIn(boolean set)
           
static void setAutomateNumberOfSamples(boolean set)
           
static void setAutomateProposalVariances(boolean set)
           
static void setAutomateStepRate(boolean set)
           
static boolean shouldAutomateBurnIn()
           
static boolean shouldAutomateNumberOfSamples()
           
static boolean shouldAutomateProposalVariances()
           
static boolean shouldAutomateStepRate()
           
static boolean shouldStopBurnIn(java.util.ArrayList<java.lang.Double> logLikeList)
          If the logLikelihood has a major decline, we stop the burnin
static boolean shouldStopSampling(java.util.ArrayList<java.lang.Double> distances)
          If the last element in the distances variable is larger than PERCENT_CONST we stop.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERCENT_CONST

public static final double PERCENT_CONST
See Also:
Constant Field Values
Constructor Detail

AutomateParameters

public AutomateParameters()
Method Detail

shouldAutomateBurnIn

public static boolean shouldAutomateBurnIn()

setAutomateBurnIn

public static void setAutomateBurnIn(boolean set)

shouldAutomateStepRate

public static boolean shouldAutomateStepRate()

setAutomateStepRate

public static void setAutomateStepRate(boolean set)

shouldAutomateProposalVariances

public static boolean shouldAutomateProposalVariances()

setAutomateProposalVariances

public static void setAutomateProposalVariances(boolean set)

shouldAutomateNumberOfSamples

public static boolean shouldAutomateNumberOfSamples()

setAutomateNumberOfSamples

public static void setAutomateNumberOfSamples(boolean set)

getSampleRateOfTheSpace

public static int getSampleRateOfTheSpace(java.util.ArrayList<java.lang.Double> theSpace,
                                          int stepSizeOfTheBurnIn)
Looks either for major decline in theSpace or if we get very close to the average line. Then we break.

Parameters:
theSpace - Gives you the average similarity between samples that have index * stepSizeOfTheBurnIn steps between them (theSpace[2] gives you the average similarity between samples that are 2 * stepSizeOfTheBurnIn steps away)
stepSizeOfTheBurnIn - only used in the end, maybe unnecessary ?
Returns:
the desired sampling rate (int)

shouldStopSampling

public static boolean shouldStopSampling(java.util.ArrayList<java.lang.Double> distances)
If the last element in the distances variable is larger than PERCENT_CONST we stop.

Parameters:
distances - ArrayList of distances between consecutive fuzzyAlignments
Returns:
True if we want to stop, else false

shouldStopBurnIn

public static boolean shouldStopBurnIn(java.util.ArrayList<java.lang.Double> logLikeList)
If the logLikelihood has a major decline, we stop the burnin

Parameters:
logLikeList - List of the values where we look for the decline
Returns:
true if we found a major decline in the logLikeList and we want to stop sampling, else false