Skip to content

urso/rb_prob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

rb_prob is a simple monadic probabilistic programming library for ruby. Using monads directly can become quite messy. See package rb_probdsl for implicit probabilistic programming which uses rb_prob as backend (So one can mix the best of both worlds...)

Installation

Install Gem

rb_prob is available via rubygems.org and be installed using rubygems:

$ gem install rb_prob

Install From Source

  1. get the source

  2. install the gem (in source directory):

    $ gem build rb_prob.gemspec $ sudo gem install rb_prob

Usage:

To use rb_prob you need to use rubygems and require the library:

require 'rubygems'

require 'prob'
include Probably # optional, but will save some typing

TODO: explain how to combine probabilities and different methods of applying events and doing bayesian inference.

Examples

The 'examples' directory contains documented examples describing the problem and solution with forumlas and code. It is recommended to read them to get a feeling for how rb_prob and monadic probabilistic programming works.

Recommended reading order:

  • examples/diagnosis.rb # most basic bayesian inference example
  • examples/montyhall.rb # monty hall problem/paradox
  • examples/alarm.rb # example from Artificial Intelligence - A Modern Approach
  • example/spamplan.rb # a spam filter

About

monadic probabilistic programming library for ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages