littlemcmc.QuadPotentialDiagAdapt¶
-
class
littlemcmc.
QuadPotentialDiagAdapt
(n, initial_mean, initial_diag=None, initial_weight=0, adaptation_window=101, adaptation_window_multiplier=1, dtype=None)¶ Adapt a diagonal mass matrix from the sample variances.
-
__init__
(n, initial_mean, initial_diag=None, initial_weight=0, adaptation_window=101, adaptation_window_multiplier=1, dtype=None)¶ Set up a diagonal mass matrix.
Methods
__init__
(n, initial_mean[, initial_diag, …])Set up a diagonal mass 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. -