Click or drag to resize

MetropolisHastingsSamplerT Class

Metropolis-Hastings sampling produces samples from distribution P by sampling from a proposal distribution Q and accepting/rejecting based on the density of P. Metropolis-Hastings sampling doesn't require that the proposal distribution Q is symmetric in comparison to . It does need to be able to evaluate the proposal sampler's log density though. All densities are required to be in log space. The Metropolis-Hastings sampler is a stateful sampler. It keeps track of where it currently is in the domain of the distribution P.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.Statistics.McmcMcmcSamplerT
    Altaxo.Calc.Statistics.McmcMetropolisHastingsSamplerT

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

Type Parameters

T
The type of samples this sampler produces.

The MetropolisHastingsSamplerT type exposes the following members.

Constructors
 NameDescription
Public methodMetropolisHastingsSamplerT Constructs a new Metropolis-Hastings sampler using the default Random random number generator. This constructor will set the burn interval.
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 propertyRandomSource Gets or sets the random number generator.
(Inherited from McmcSamplerT)
Top
Methods
 NameDescription
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 methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodSample Returns a sample from the distribution P.
(Overrides McmcSamplerTSample)
Public methodSample(Int32) Returns a number of samples.
(Inherited from McmcSamplerT)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected fieldAccepts Keeps track of the number of accepted samples.
(Inherited from McmcSamplerT)
Protected fieldSamples Keeps track of the number of calls to the proposal sampler.
(Inherited from McmcSamplerT)
Top
See Also