Skip to content

A collection of structs and functions to help with MCMC-style Bayesian inference.

License

Notifications You must be signed in to change notification settings

vlanore/bayes_toolbox

Repository files navigation

Bayes' toolbox 🛠

Build Status codecov licence CeCILL

Bayes toolbox is a C++14 header-only library for high-performance Bayesian inference that enables low-level optimizations. Data types are kept as simple as possible (e.g. structs with raw double members) but the library provides powerful polymorphic operations on those datatypes. Polymorphism is obtained at compile-time with template metaprogramming to minimize runtime overhead.

Here is a small example of what can be done with the library:

// simple graphical model
auto alpha = make_node<exponential>(1.0);
auto mu = make_node<exponential>(1.0);
auto lambda = make_node_array<gamma_ss>(5, n_to_one(alpha), n_to_one(mu)); //node array

auto gen = make_generator(); // random generator
draw(alpha, gen); // draw in distribution
draw(mu, gen);
draw(lambda, gen); // draws whole array
double my_logprob = logprob(alpha) + logprob(mu) + logprob(lambda);

More detail about library usage can be found in the documentation.

Bayes' toolbox uses the following header-only libraries:

About

A collection of structs and functions to help with MCMC-style Bayesian inference.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages