class MetropolisHastingsWithPrefetching[A] extends MarkovChain[A]
Metropolis-Hastings algorithm with speculative executing - generates random samples from a target distribution using only samples from a proposal distribution
The prefetching strategy precomputes (part of) the tree of possible future states and evaluates the states in parallel. If proposals are cheap to compute but evaluation expensive (and single threaded), this strategy might lead to a speed improvement, especially when the number of acceptance is quite low.
See for example Accelerating Metropolis–Hastings algorithms: Delayed acceptance with prefetching M. Banterle, C. Grazian, C .Robert https://arxiv.org/pdf/1406.2660.pdf for a good discussion of the idea and possibilities for further improvements.
- Alphabetic
- By Inheritance
- MetropolisHastingsWithPrefetching
- MarkovChain
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MetropolisHastingsWithPrefetching(generator: ProposalGenerator[A] with TransitionRatio[A], evaluator: DistributionEvaluator[A], numberOfParallelEvaluations: Int)(implicit random: Random)
- generator
The proposal generator
- evaluator
The evaluator used to compute the (log) probability
- numberOfParallelEvaluations
The number of
- Attributes
- protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val evaluator: DistributionEvaluator[A]
- implicit val executionContext: ExecutionContextExecutor
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val generator: ProposalGenerator[A] with TransitionRatio[A]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator(start: A, logger: AcceptRejectLogger[A]): Iterator[A]
start a logged iterator
- def iterator(current: A): Iterator[A]
provide a chain starting from current as an iterator
provide a chain starting from current as an iterator
- Definition Classes
- MarkovChain
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next(current: A): A
next sample in chain
next sample in chain
- Definition Classes
- MetropolisHastingsWithPrefetching → MarkovChain
- def next(current: A, logger: AcceptRejectLogger[A]): A
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numberOfParallelEvaluations: Int
- implicit val random: Random
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()