Types in MathNet.Numerics.Statistics.Mcmc

Type RejectionSampler<T>

Namespace MathNet.Numerics.Statistics.Mcmc

Parent McmcSampler<T>

Rejection sampling produces samples from distribution P by sampling from a proposal distribution Q and accepting/rejecting based on the density of P and Q. The density of P and Q don't need to to be normalized, but we do need that for each x, P(x) < Q(x).




Public Constructors

RejectionSampler<T>(Density<T> pdfP, Density<T> pdfQ, GlobalProposalSampler<T> proposal)

Constructs a new rejection sampler using the default Random random number generator.
Density<T> pdfP

The density of the distribution we want to sample from.

Density<T> pdfQ

The density of the proposal distribution.

GlobalProposalSampler<T> proposal

A method that samples from the proposal distribution.

Public Methods

bool Equals(object obj)

int GetHashCode()

Type GetType()

T Sample()

Returns a sample from the distribution P.

T[] Sample(int n)

Returns a number of samples.
int n

The number of samples we want.


An array of samples.

string ToString()

Public Properties

double AcceptanceRate get;

Random RandomSource get; set;