Skip to content

Hamiltonian Monte Carlo #144

Open
Open
@reubenharry

Description

@reubenharry

Hamiltonian Monte Carlo (HMC) is a widely used, gradient based, MCMC algorithm, that is the backbone of Stan's inference. I plan to implement it for monad-bayes. Todos (checkboxes indicate things done on branch):

  • a means of converting a probabilistic program into a function f :: Floating n => [n] -> n (Or: can I use Numeric.AD.Double?)
  • refactor of monad-bayes to move from the concrete type Double to any number, which is needed for automatic differentiation of f
  • implementation of Hamiltonian dynamics with a numerical integrator
  • Thorough testing

Optional:

  • Non-parametric HMC: this allows HMC to work for arbitrary probabilistic programs, not just ones with a fixed number of variables
  • NUTS dynamics
  • Riemannian HMC

I have the basic pieces working on branch, but the checkboxes indicate further steps. Current roadblocks:

  • many distributions are defined using inverse cdfs from the statistics package, which use concrete type Double. I need versions that are in terms of arbitrary Num n => n, for autodiff to work.
  • Non-parametric HMC requires some further understanding on my part, in particular if I want to do something beautifully lazy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions