Skip to content

A general probabilistic graphical models framework for Rust

License

Notifications You must be signed in to change notification settings

jawallace/jerome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jerome

A general probabilistic graphical models framework for Rust.

In the same vein as edward (which is named after an influential statistician) jerome is named for Jerome Cornfield, a pioneer of Bayesian statistics that was the first to link a cause-effect relationship between smoking and lung cancer and laid the groundwork for "much of modern epidemiology".

Getting Started

To use jerome, you will need Rust 1.26+. Instructions for installing Rust are here.

The fastest way to start using jerome is to take a look at the examples in examples/. These examples can be run via cargo, Rust's build tool:

# an example of using jerome to represent Bayesian Networks
cargo run --example representation
# an example of using jerome to run inference on a Bayesian network
cargo run --example inference
# an example of using jerome to estimate parameters for a Bayesian network
cargo run --example estimation

For example running the estimation example looks like this:

jerome

jerome comes with a comprehensive test suite. Tests can be run from cargo:

cargo test

Note that, at the moment, the tests that use random number generation are not seeded, and therefore occasionally fail if, for example, samples drawn from a model for inference yield a probability slightly outside of the defined limits.

Finally, HTML documentation for jerome and it's dependencies can be generated via cargo's doc command:

cargo doc
firefox target/doc/jerome/index.html

Goals

The ultimate goal for jerome is to provide an efficient framework for Bayesian inference in Rust.

For the short term (i.e. for the purposes of this being a class project) the goal is to demonstrate the three 'pillars' of probabilistic graphical models for directed (Bayesian) models:

  • representation
  • inference
  • learning

Tasks

Below is a rough outline of what has been accomplished so far. Please note that I was able to accomplish the goals I set forth in the project outline (those are in bold below). The other tasks are things that I was hoping to get to and plan to address in the future to end up with a useful framework.

Representation

  • Represent discrete random variables
  • Represent continous random variables
  • Represent directed models
  • Represent undirected models

Inference

  • Exact inference for directed models (Variable Elimination)
  • Exact inference for undirected models
  • Approximate inference for directed models (Importance Sampling, MCMC Methods)
  • Approximate inference for undirected models (MCMC Methods)

Learning

  • Maximum Likelihood parameter estimation for directed models
  • Bayesian parameter estimation for directed models

About

A general probabilistic graphical models framework for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages