Click or drag to resize

HybridMCGenericT Class

The Hybrid (also called Hamiltonian) Monte Carlo produces samples from distribution P using a set of Hamiltonian equations to guide the sampling process. It uses the negative of the log density as a potential energy, and a randomly generated momentum to set up a Hamiltonian system, which is then used to sample the distribution. This can result in a faster convergence than the random walk Metropolis sampler ().
Inheritance Hierarchy

Namespace: Altaxo.Calc.Statistics.Mcmc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public abstract class HybridMCGeneric<T> : McmcSampler<T>

Type Parameters

T
The type of samples this sampler produces.

The HybridMCGenericT type exposes the following members.

Constructors
 NameDescription
Protected methodHybridMCGenericT Constructs a new Hybrid Monte Carlo sampler.
Top
Properties
 NameDescription
Public propertyAcceptanceRate Gets the acceptance rate of the sampler.
(Inherited from McmcSamplerT)
Public propertyBurnInterval Gets or sets the number of iterations in between returning samples.
Public propertyFrogLeapSteps Gets or sets the number of iterations in the Hamiltonian equation.
Public propertyRandomSource Gets or sets the random number generator.
(Inherited from McmcSamplerT)
Public propertyStepSize Gets or sets the size of each step in the Hamiltonian equation.
Top
Methods
 NameDescription
Protected methodBurn This method runs the sampler for a number of iterations without returning a sample
Protected methodCopy Use for copying objects in the Burn method.
Protected methodCreate Use for creating temporary objects in the Burn method.
Protected methodDoAdd Method for adding, multiply the second vector/scalar by factor and then add it to the first vector/scalar.
Protected methodDoProduct Method for doing dot product.
Protected methodDoSubtract Multiplying the second vector/scalar by factor and then subtract it from the first vector/scalar.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodHamiltonian Method to compute the Hamiltonian used in the method.
Protected methodHamiltonianEquations The Hamiltonian equations that is used to produce the new sample.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodRandomizeMomentum Method for sampling a random momentum.
Public methodSample Returns a sample from the distribution P.
(Overrides McmcSamplerTSample)
Public methodSample(Int32) Returns a number of samples.
(Inherited from McmcSamplerT)
Protected methodSetNonNegative Method to check and set a quantity to a non-negative value.
Protected methodSetPositive(Double) Method to check and set a quantity to a non-negative value.
Protected methodSetPositive(Int32) Method to check and set a quantity to a non-negative value.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodUpdate Method used to update the sample location. Used in the end of the loop.
Top
Fields
 NameDescription
Protected fieldAccepts Keeps track of the number of accepted samples.
(Inherited from McmcSamplerT)
Protected fieldCurrent The current location of the sampler.
Protected fieldSamples Keeps track of the number of calls to the proposal sampler.
(Inherited from McmcSamplerT)
Top
See Also