Reference / binference.priors.GammaRates

binference.priors.GammaRates

class binference.priors.GammaRates(shape=1.0, rate=1e-06)[source]

Independent Gamma priors on per-bin rates, \(\lambda_k \sim \mathrm{Gamma}(a_k, b_k)\).

Use this to infer expected counts (e.g. occurrence rates, or number densities with a known exposure) rather than fractions. Results report both rates and the implied fractions rho = lambda / sum(lambda). Without selection effects and with a common rate b, GammaRates(alpha, b) implies rho ~ Dirichlet(alpha).

Parameters:
shapefloat or array_like (K,)

Gamma shape parameters a_k (default 1).

ratefloat or array_like (K,)

Gamma rate parameters b_k (default 1e-6, i.e. vague). Use an informative value for prior predictive checks or simulation-based calibration.

__init__(shape=1.0, rate=1e-06)[source]

Methods

__init__([shape, rate])

bind(bins)

Attributes

kind

"fractions" (a distribution on the simplex) or "rates"

kind = 'rates'

"fractions" (a distribution on the simplex) or "rates"