Skip to content

Introduction to the concepts and tools behind probabilistic programming

License

Notifications You must be signed in to change notification settings

luisfciencias/intro-probabilistic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to Probabilistic Programming

Introduction to the concepts and tools behind probabilistic programming

Topics

Installation tips

Convention: python3 (3.6.8) in my machine (mac), I think 3.7 should be fine. You might want to build an independent python environment to avoid messing up with your libraries.

Dependencies listed within requirements.txt.

Before following your instincts and make the call to

pip install -r requirements.txt

There might be some potential issues at the pyro-ppl stage, considering it depends on pytorch. If this is the case take a look at the bottom to see the issue I experienced on my machine. If everything works fine, congratulations.

To install statsmodels

pip install statsmodels

To install pymc3 (3.6). Including the factor 3 is important otherwise you will install pymc2.

pip install pymc3

Simple idea about pymc, python in all cases and the calculation part:

  • pymc2: fortran
  • pymc3: Theano
  • pymc4: TensorFlow (coming months - rumour says)

Complementary tool for plotting and visualisation: ArviZ (0.4.0)

pip install arviz

To avoid a potential warning related to theano after calling pymc3

conda install mkl-service

To install tensorflow, version (1.13.1) via pip although version 1.14.0rc0 and 2.0.0a0 also available.

pip install tensorflow

To install tensorflow-probability (0.6.0), after installing tensorflow

pip install tensorflow-probability

To install the pyro suite, you need to install the pytorch suite

pip install torch

After this verify the installation of torch by simply calling

>>> import torch

If you get an error in the lines of

... from torch._C import *
... Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
... ***.dylib
...
Reason: image not found

The following might solve it

brew install libomp

After confirming the right installation of pytorch, simply install the subsequent tools involving the vision module (might not be required) and pyro.

pip install torchvision  # might not be required
pip install pyro-ppl

About

Introduction to the concepts and tools behind probabilistic programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages