Reference / binference.priors.InverseGamma

binference.priors.InverseGamma

class binference.priors.InverseGamma(a=2.0, b=1.0)[source]

Inverse-gamma prior with shape a and scale b.

Parameters:
afloat, optional

Shape.

bfloat, optional

Scale.

__init__(a=2.0, b=1.0)[source]

Methods

__init__([a, b])

dlogpdf_u(u)

from_quantiles(lower, upper[, tail])

The inverse gamma with P(< lower) = P(> upper) = tail.

logpdf_u(u)

median()

sample(n, rng)

Attributes

fixed

classmethod from_quantiles(lower, upper, tail=0.01)[source]

The inverse gamma with P(< lower) = P(> upper) = tail.

Useful for GP length scales: put little mass below the resolution of the grid and above the size of the domain (Betancourt 2017, “Robust Gaussian processes in Stan”).

Parameters:
lower, upperfloat

Values below and above which the prior puts mass tail.

tailfloat, optional

Prior mass below lower and above upper.