Skip to content

Instantly share code, notes, and snippets.

@twiecki
Created June 24, 2011 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twiecki/1045292 to your computer and use it in GitHub Desktop.
Save twiecki/1045292 to your computer and use it in GitHub Desktop.
Example code that shows how MAP can be broken when fmin walks outside the support of the variables.
import pymc as pm
t = pm.Uniform('t', 0, 1, verbose=1)
y = pm.Normal('x', mu=t, tau=1, value=-5, observed=True)
pm.MAP([t,y]).fit(verbose=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment