API Reference


sample(logp_dlogp_func, Tuple[numpy.ndarray, …) Draw samples from the posterior using the given step methods.

Step Methods

HamiltonianMC(logp_dlogp_func, …[, potential]) A sampler for continuous variables based on Hamiltonian mechanics.
NUTS(logp_dlogp_func, Tuple[numpy.ndarray, …) A sampler for continuous variables based on Hamiltonian mechanics.

Quadpotentials (a.k.a. Mass Matrices)

quad_potential(C, is_cov) Compute a QuadPotential object from a scaling matrix.
QuadPotentialDiag(v[, dtype]) Quad potential using a diagonal covariance matrix.
QuadPotentialFull(cov[, dtype]) Basic QuadPotential object for Hamiltonian calculations.
QuadPotentialFullInv(A[, dtype]) QuadPotential object for Hamiltonian calculations using inverse of covariance matrix.
QuadPotentialDiagAdapt(n, initial_mean[, …]) Adapt a diagonal mass matrix from the sample variances.
QuadPotentialFullAdapt(n, initial_mean[, …]) Adapt a dense mass matrix using the sample covariances.

Dual Averaging Step Size Adaptation

step_sizes.DualAverageAdaptation(…) Dual averaging step size adaptation.


integration.CpuLeapfrogIntegrator(potential, …) Leapfrog integrator using the CPU.