Click or drag to resize
Accord.NET (logo)

MetropolisHastingTObservation, TProposalDistribution, TTargetDistribution Class

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

Namespace:  Accord.Statistics.Distributions.Sampling
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public class MetropolisHasting<TObservation, TProposalDistribution, TTargetDistribution> : MetropolisHasting<TObservation, TProposalDistribution>
where TProposalDistribution : Object, ISampleableDistribution<TObservation[]>
where TTargetDistribution : Object, IMultivariateDistribution<TObservation[]>
Request Example View Source

Type Parameters

TObservation
TProposalDistribution
TTargetDistribution

The MetropolisHastingTObservation, TProposalDistribution, TTargetDistribution type exposes the following members.

Constructors
  NameDescription
Public methodMetropolisHastingTObservation, TProposalDistribution, TTargetDistribution
Initializes a new instance of the MetropolisHastingTObservation, TProposalDistribution, TTargetDistribution class.
Top
Properties
  NameDescription
Public propertyAcceptanceRate
Gets the acceptance rate for the proposals generated by the proposal distribution.
(Inherited from MetropolisHastingT.)
Public propertyCurrent
Gets the last successfully generated observation.
(Inherited from MetropolisHastingT.)
Public propertyCurrentValue
Gets the log-probability of the last successfully generated sample.
(Inherited from MetropolisHastingT.)
Public propertyDiscard
Gets or sets how many initial samples will get discarded as part of the initial thermalization (warm-up, initialization) process.
(Inherited from MetropolisHastingT.)
Public propertyLogProbabilityDensityFunction
Gets the log-probability density function of the target distribution.
(Inherited from MetropolisHastingT.)
Public propertyNumberOfInputs
Gets the number of dimensions in each observation.
(Inherited from MetropolisHastingT.)
Public propertyProposal
Gets or sets the move proposal distribution.
(Inherited from MetropolisHastingTObservation, TProposalDistribution.)
Public propertyRandomSource
Gets or sets a factory method to create random number generators used in this instance.
(Inherited from MetropolisHastingT.)
Public propertyTarget
Gets the target distribution whose samples must be generated.
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.
(Inherited from MetropolisHastingT.)
Public methodGenerate(Int32)
Generates a random vector of observations from the current distribution.
(Inherited from MetropolisHastingT.)
Public methodGenerate(Int32, T)
Generates a random vector of observations from the current distribution.
(Inherited from MetropolisHastingT.)
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(Int32, FuncT, Double, FuncT, T, T)
Initializes the algorithm.
(Inherited from MetropolisHastingT.)
Protected methodInitialize(Int32, FuncTObservation, Double, TProposalDistribution)
Initializes the algorithm.
(Inherited from MetropolisHastingTObservation, TProposalDistribution.)
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.
(Inherited from MetropolisHastingT.)
Public methodTryGenerate(T)
Attempts to generate a new observation from the target distribution, storing its value in the Current property.
(Inherited from MetropolisHastingT.)
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.
(Inherited from MetropolisHastingT.)
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