This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Gibbs sampler for function: | |
f(x,y) = x x^2 \exp(-xy^2 - y^2 + 2y - 4x) | |
using conditional distributions: | |
x|y \sim Gamma(3, y^2 +4) | |
y|x \sim Normal(\frac{1}{1+x}, \frac{1}{2(1+x)}) | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Cython wrapper for the fast-dm code by Voss & Voss | |
# (C) by Thomas Wiecki (thomas_wiecki@brown.edu), 2010 | |
# GPLv2 or later. | |
from __future__ import division | |
import numpy as np | |
cimport numpy as np | |
cimport cython |