Click or drag to resize
Accord.NET (logo)

MetropolisHastingT Class

Metropolis-Hasting sampling algorithm.
Inheritance Hierarchy
SystemObject
  Accord.Statistics.Distributions.SamplingMetropolisHastingT
    Accord.Statistics.Distributions.SamplingMetropolisHastingTObservation, TProposalDistribution

Namespace:  Accord.Statistics.Distributions.Sampling
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public class MetropolisHasting<T> : IRandomNumberGenerator<T[]>
Request Example View Source

Type Parameters

T

The MetropolisHastingT type exposes the following members.

Constructors
  NameDescription
Protected methodMetropolisHastingT
Initializes a new instance of the MetropolisHastingT class.
Public methodMetropolisHastingT(Int32, FuncT, Double, FuncT, T, T)
Initializes a new instance of the MetropolisHasting algorithm.
Top
Properties
  NameDescription
Public propertyAcceptanceRate
Gets the acceptance rate for the proposals generated by the proposal distribution.
Public propertyCurrent
Gets the last successfully generated observation.
Public propertyCurrentValue
Gets the log-probability of the last successfully generated sample.
Public propertyDiscard
Gets or sets how many initial samples will get discarded as part of the initial thermalization (warm-up, initialization) process.
Public propertyLogProbabilityDensityFunction
Gets the log-probability density function of the target distribution.
Public propertyNumberOfInputs
Gets the number of dimensions in each observation.
Public propertyProposal
Gets or sets the move proposal distribution.
Public propertyRandomSource
Gets or sets a factory method to create random number generators used in this instance.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGenerate
Generates a random observation from the current distribution.
Public methodGenerate(Int32)
Generates a random vector of observations from the current distribution.
Public methodGenerate(Int32, T)
Generates a random vector of observations from the current distribution.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInitialize
Initializes the algorithm.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGenerate
Attempts to generate a new observation from the target distribution, storing its value in the Current property.
Public methodTryGenerate(T)
Attempts to generate a new observation from the target distribution, storing its value in the Current property.
Public methodWarmUp
Thermalizes the sample generation process, generating up to Discard samples and discarding them. This step is done automatically upon the first call to any of the Generate functions.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks
See Also