All Projects → gelman → ep-stan

gelman / ep-stan

Licence: other
No description, website, or topics provided.

Programming Languages

python
139335 projects - #7 most used programming language
Stan
76 projects

Python code supplement for "Expectation propagation as a way of life"

Requirements (tested version):

  • python (3.5.2)
  • numpy (1.13.3)
  • scipy (0.19.1)
  • cython (0.27.3)
  • pystan (2.17.0.0)
  • matplotlib (2.1.0) (only for plotting the results)

Setup

Compile the Cython utilities with python setup.py build_ext --inplace. Test Scipy compatibility by running python test_scipy.py, see notes on the bottom.

Usage

The folder experiment contains simple hierarchical logistic regression examples. See python fit.py -h or the respective module docstring for help. For more information, see e.g. the class documentation of dep.method.Master.

License

Released under the 3-clause BSD license.

Notes

The program does not work correctly in some scipy builds because of an issue in the in-place operation of dpotri Lapack-routine with C- or F-order matrices. In some builds, the in-place operation works for F-order matrices but not for C-order matrices, whereas in some builds, it works the opposite way. The former behaviour is assumed in this program. This compatibility problem can be tested by running a simple test script by python test_scipy.py.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].