littlemcmc.QuadPotentialDiag

class littlemcmc.QuadPotentialDiag(v, dtype=None)

Quad potential using a diagonal covariance matrix.

__init__(v, dtype=None)

Use a vector to represent a diagonal matrix for a covariance matrix.

Parameters:
v : vector, 0 <= ndim <= 1

Diagonal of covariance matrix for the potential vector

Methods

__init__(v[, dtype]) Use a vector to represent a diagonal matrix for a covariance matrix.
energy(x[, velocity]) Compute kinetic energy at a position in parameter space.
raise_ok([vmap]) Check if the mass matrix is ok, and raise ValueError if not.
random() Draw random value from QuadPotential.
reset() Reset quadpotential adaptation routine.
update(sample, grad, tune) Inform the potential about a new sample during tuning.
velocity(x[, out]) Compute the current velocity at a position in parameter space.
velocity_energy(x, v_out) Compute velocity and return kinetic energy at a position in parameter space.