Namespaces

Types in MathNet.Numerics.Statistics.Mcmc

Type UnivariateSliceSampler

Namespace MathNet.Numerics.Statistics.Mcmc

Parent McmcSampler<T>

Slice sampling produces samples from distribution P by uniformly sampling from under the pdf of P using a technique described in "Slice Sampling", R. Neal, 2003. All densities are required to be in log space. The slice sampler is a stateful sampler. It keeps track of where it currently is in the domain of the distribution P.

Constructors

Methods

Properties

Public Constructors

UnivariateSliceSampler(double x0, DensityLn<T> pdfLnP, double scale)

Constructs a new Slice sampler using the default Random random number generator. The burn interval will be set to 0.
Parameters
double x0

The initial sample.

DensityLn<T> pdfLnP

The density of the distribution we want to sample from.

double scale

The scale factor of the slice sampler.

UnivariateSliceSampler(double x0, DensityLn<T> pdfLnP, int burnInterval, double scale)

Constructs a new slice sampler using the default Random random number generator. It will set the number of burnInterval iterations and run a burnInterval phase.
Parameters
double x0

The initial sample.

DensityLn<T> pdfLnP

The density of the distribution we want to sample from.

int burnInterval

The number of iterations in between returning samples.

double scale

The scale factor of the slice sampler.

Public Methods

bool Equals(object obj)

int GetHashCode()

Type GetType()

double Sample()

Returns a sample from the distribution P.

Double[] Sample(int n)

Returns a number of samples.
Parameters
int n

The number of samples we want.

Return
Double[]

An array of samples.

string ToString()

Public Properties

double AcceptanceRate get;

int BurnInterval get; set;

Gets or sets the number of iterations in between returning samples.

Random RandomSource get; set;

double Scale get; set;

Gets or sets the scale of the slice sampler.