Class ErgodicHybridMCMC

java.lang.Object
dev.nm.stat.random.rng.multivariate.mcmc.hybrid.ErgodicHybridMCMC
All Implemented Interfaces:
RandomVectorGenerator, Seedable

public class ErgodicHybridMCMC extends Object implements RandomVectorGenerator
A simple decorator which will randomly vary dt between each sample. At each step dt is uniformly chosen from a given range. This avoids the possibility that the chosen dt produces a trajectory that is periodic for L leapfrog steps, and hence returns to (or close to) the starting point at each iteration. In cases where there are a lot of interactions between the components, this should not be an issue, although even near periodicities can have a significant adverse effect on the performance of the algorithm.
  • Constructor Details

    • ErgodicHybridMCMC

      public ErgodicHybridMCMC(double dt0, UnivariateRealFunction deltaT, AbstractHybridMCMC hybridMCMC)
      Constructs a new instance where dt is given as a function.
      Parameters:
      dt0 - the initial value for dt
      deltaT - the function that gives the next value of dt given the current value
      hybridMCMC - the underlying AbstractHybridMCMC
    • ErgodicHybridMCMC

      public ErgodicHybridMCMC(double a, double b, RandomLongGenerator uniform, AbstractHybridMCMC hybridMCMC)
      Constructs a new instance where dt is uniformly drawn from a given range.
      Parameters:
      a - the lower bound of the range
      b - the upper bound of the range
      uniform - the random long generator to be used
      hybridMCMC - the underlying AbstractHybridMCMC
  • Method Details

    • nextVector

      public double[] nextVector()
      Description copied from interface: RandomVectorGenerator
      Gets the next random vector.
      Specified by:
      nextVector in interface RandomVectorGenerator
      Returns:
      the next random vector
    • seed

      public void seed(long... seeds)
      Description copied from interface: Seedable
      Seed the random number/vector/scenario generator to produce repeatable experiments.
      Specified by:
      seed in interface Seedable
      Parameters:
      seeds - the seeds