--
You received this message because you are subscribed to the Google Groups "PyMC" group.
To post to this group, send email to py...@googlegroups.com.
To unsubscribe from this group, send email to pymc+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pymc?hl=en.
multichain.
The examples seem to run just fine and I am trying to use this for my
MCMC problem which involves a large number of dimensions. Normal MCMC
does not seem to mix right and usually gets stuck and appears to
converge away from the true minima. I was hoping that the use of the
gradient would help.
I am however getting the following error and I am not sure how to get
around it:
NotImplementedError: <pymc.PyMCObjects.Stochastic 'D' at 0x105e54fd0>
has no gradient function for parameter z
Is there something that object D should provide? This is actually a
function that computes a model and compares it to some observations
and returns a logp probability. Does it need t have a way to compute
its own partial derivative? Is this documented somewhere? I am not
sure how to proceed.
N
> most convenient place to read the examples ishttp://github.com/jsalvatier/multichain_mcmc/tree/master/multichain_m....
I’ve been meaning to take a look at your multichain code for a while now, and haven’t found the time. I didn’t realize that it needed gradients. Have you seen pycppad? It is an automatic differentiation package for python, written by my colleague at UW Brad Bell http://www.seanet.com/~bradbell/pycppad/index.xml. Unfortunately it doesn’t work with many PyMC stochastics by default, because it can’t differentiate functions that call fortran library functions. But it could be very handy for your methods if you were to reimplement the common stochastics as pure python functions.
--Abie
Abraham D. Flaxman
Assistant Professor
Institute for Health Metrics and Evaluation | University of Washington
2301 5th Avenue, Suite 600 | Seattle, WA 98121| USA
Tel: +1-206-897-2800 | Fax: +1-206-897-2899 UW
ab...@uw.edu | http://healthmetricsandevaluation.org | http://healthyalgorithms.wordpress.com
--
HiThanks.My @observed function is rather non trivial and uses some external code to generate models, given the input parameters that pymc is trying to sample. Would I be able to get by with a simple numerical computation of the derivative using something like (D(z)-D(z+dz))/dz?N