Reference / Notation

Notation

Each symbol has one meaning across the documentation and the docstrings. The tables give the symbol, its meaning, the name the code uses, and the page that defines it. Indices are \(i\) for objects, \(k\) for bins, \(j\) for measured bins and \(s\) for draws; other indices are declared where they are used. The Glossary defines the terms.

Objects, bins and likelihoods

Symbol

Meaning

Code name

Where defined

\(N\)

number of objects

lk.N, model.N

model

\(d_i\)

data of object \(i\)

the inputs of Likelihoods.from_*

model

\(D\)

the data of all objects

model

\(z\)

true value of an object

values in result.sample_values()

model

\(K\)

number of bins

bins.K

model

\(B_k\)

bin \(k\)

bins.edges, bins.labels

model

\(v_k\)

volume of bin \(k\)

bins.volumes

model

\(u=T(z)\)

measure coordinate, in which the population is flat within a bin

Measure, bins.u_edges

inputs

\(\ell_i(z)\)

likelihood function of object \(i\), \(p(d_i\mid z)\)

density= of from_density

model

\(L_{ik}\)

bin-averaged likelihood

Likelihoods

model

\(\bar L_{ik}\)

\(L_{ik}\) normalised to a row maximum of one

lk.values

inputs

\(w_i\)

weight (multiplicity) of object \(i\)

lk.weights

model

\(W\)

total weight, \(\sum_iw_i\)

lk.W

model

\(\pi(z)\)

interim prior

interim=

model

\(P_{ik}\)

mass of object \(i\)’s posterior in bin \(k\)

the table of from_table(..., interim=)

model

\(\Pi_k\)

mass of the interim prior in bin \(k\)

Density.masses

model

\(\omega_s\)

importance weight of sample or draw \(s\)

sample_weights=

inputs

\(n_{\rm draw}\)

number of draws or importance weights

n_samples (draws an engine makes), n_draws (stored draws a method uses), n_predictive, n_proposals

engines

The population

Symbol

Meaning

Code name

Where defined

\(\rho_k\)

population fraction of bin \(k\)

result.samples, result.mean, est.rho

model

\(\Delta^{K-1}\)

the simplex: \(K\) non-negative numbers that sum to one

model

\(p(z\mid\rho)\)

population density: flat in the measure coordinate within each bin; its average over bin \(k\) is \(\rho_k/v_k\)

result.density() (the bin averages)

model

\(\lambda_k\)

rate: expected number of objects in bin \(k\)

result.rates, GammaRates

model

\(\Lambda\)

total expected number of objects

result.total

model

\(k_i\)

bin (label) of object \(i\)

result.sample_assignments()

model

\(r_{ik}(\rho)\)

responsibility: object \(i\)’s posterior over bins given \(\rho\)

model.responsibilities

model

\(P(k_i=k\mid D)\)

hierarchical posterior of object \(i\)

result.assignment_probabilities()

model

\(n_k\)

realised histogram: observed objects in bin \(k\)

result.realized_counts()

model

\(\hat n_k(\rho)\)

expected counts, \(\sum_iw_ir_{ik}(\rho)\)

model.expected_counts

model

\(g_k\)

KKT ratio \(W^{-1}\sum_iw_iL_{ik}/(L_i\cdot\hat\rho)\); with a flat prior and no selection the KKT gap is \(\max_kg_k-1\)

kkt_gap

point estimates

\(f\)

fraction of missing information

model.missing_information

point estimates

\(I_{\rm obs}\), \(I_c\)

observed and complete-data information

point estimates

Selection and responses

Symbol

Meaning

Code name

Where defined

\(S_k\)

selection: probability that an object in bin \(k\) is observed, or its exposure

Selection.values

model

\(\tilde L_{ik}\)

detected-object likelihood: \(S_kL_{ik}\) on the truth, \(L_{ik}\) on the measurement

model

\(S^{\rm truth}(z)\), \(S^{\rm meas}(d)\)

the two parts of a combined selection

Selection.combined(on_truth=, on_measurement=)

selection

\(\phi_k\)

selected population: \(S_k\rho_k/S\cdot\rho\)

result.selected

point estimates

\(\chi_k\)

composition of the rates in mix-SQP

point estimates

\(M\)

number of objects the selection missed

model

\(m_k\)

missed objects in bin \(k\)

realized_counts(full=True)

model

\(n^{\rm inj}_k\), \(n^{\rm rec}_k\)

injected and recovered objects in bin \(k\)

selection.injections

selection

\(\tau_S\)

step scale of the random walk on logit \(S\)

smooth= of from_injections

selection

\(J\)

number of measured bins

response.measured_bins.K

inputs

\(R_{jk}\)

response: probability of measured bin \(j\) and observation, given true bin \(k\)

response.matrix

inputs

\(\epsilon_k\)

efficiency: probability that an object in true bin \(k\) is observed

response.efficiency

inputs

Priors

Symbol

Meaning

Code name

Where defined

\(\alpha_k\)

Dirichlet concentration, also of a tallied response’s columns

Dirichlet(alpha), prior= of Response.from_counts

priors

\(n^{\rm ref}_k\)

counts of a reference sample

counts of Dirichlet.from_counts

priors

\(\kappa\)

weight of the reference counts in \(\alpha_k\)

strength=

priors

\(G_0\)

base measure of a prior

base=

priors

\(\nu_k\)

stick-breaking proportions of a generalised Dirichlet

priors

\(c_{\rm PT}\), \(p_{\rm PT}\), \(h\)

Pólya-tree concentration, its growth with depth, and the depth

PolyaTree(c, power)

priors

\(a_k\), \(b_k\)

Gamma shape and rate of the rate \(\lambda_k\)

GammaRates(shape, rate)

model

\(\eta\)

log-fractions, \(\rho=\mathrm{softmax}(\eta)\)

priors

\(\mu\)

prior mean of \(\eta\)

mean=

priors

\(E\)

basis of a logistic prior, one column per mode

priors

\(\theta\)

hyperparameters: amplitude, scale, length scale

amplitude=, scale=, length_scale=

priors

\(s_j(\theta)\)

prior standard deviation of mode \(j\)

priors

\(\xi_j\)

whitened coefficient of mode \(j\)

priors

\(c_j\)

coefficient of mode \(j\), \(s_j\xi_j\)

priors

\(\zeta_j\)

partially centred coefficient of mode \(j\)

engines

\(\gamma_j\)

partial-centring weight of mode \(j\)

info["centring"]

engines

\(\tau\)

standard deviation of the random walk’s differences

scale= of LogisticRandomWalk

priors

\(r\)

order of the random walk’s differences

order=

priors

\(e_j\)

eigenvalue \(j\) of the random walk’s difference precision

priors

\(\Delta\)

half the range of a grid axis, in the measure coordinate

priors

\(c_{\rm box}\)

size of the Gaussian-process box relative to \(\Delta\)

boundary_factor=

priors

\(n_{\rm basis}\)

number of sines per axis

n_basis=

priors

\(f_{\rm ker}\)

resolution factor of a kernel

defaults

\(\psi_k(z)\)

component \(k\) of a Basis

Basis

inputs

\(\beta_k\)

fraction of the population in component \(k\)

result.component_draws

inputs

\(A_{jk}\)

mass of component \(k\) in bin or cell \(j\)

basis.matrix

inputs

Coordinates, engines and diagnostics

Symbol

Meaning

Code name

Where defined

\(x\)

unconstrained coordinates

result.x

priors

\(Q\)

orthonormal Helmert basis of the isometric log-ratio

priors

\(H\)

Hessian of the log posterior

engines

\(\hat R\)

split R-hat

diagnostics.rhat, result.diagnostics["rhat"]

validation

ESS

effective sample size, bulk or tail

diagnostics.ess, result.diagnostics["ess_bulk"]

validation

\(\hat k\)

Pareto shape of importance weights

diagnostics.psis, result.info["k_hat"]

engines

\(\tau_{\rm int}\)

integrated autocorrelation time of a chain

diagnostics.autocorr_time

engines

\(V_i(\rho)\)

relative Monte Carlo variance of a likelihood from samples

lk.sample_variance

inputs

\(n_{\rm sim}\)

number of simulated data sets

n_simulations=

validation

The field pages quote each field’s own formulas. On the gravitational-wave page, \(\Lambda\) denotes hyperparameters, \(\theta\) an event’s parameters, \(S_i\) the number of samples of event \(i\), \(R\) the merger rate and \(N_\text{draw}\) the number of injections. On the empirical-Bayes page, \(w\) and \(g\) denote \(\rho\).

The argument kind has a meaning of its own in each place it appears:

  • in the Likelihoods constructors, the kind of input ("likelihood", or a posterior with interim=);

  • in diagnostics.ess, the effective sample size computed ("bulk", "tail" or "mean");

  • in PopulationResult.interval, the interval ("central" or "hdi");

  • on a prior and a result, whether it describes fractions or rates.