[SciPy-user] Monte Carlo package

David Huard david.huard at gmail.com
Thu Jan 26 10:18:26 EST 2006


No, no, i'd be glad if it was that simple ! I'm using PyMC to generate
samples from a posterior. I then use gaussian_kde to build the pdf, and if
need be, resample from it to evaluate the uncertainty on predictions using
the resample method.

The next step is to use a Gibbs sampler instead of M-H to estimate the
posterior pdf of the parameters of a peak over threshold problem. Out of the
three parameters, two have a Gamma conditional probability, and the third
has a non-descript shape. Hence, the solution proposed in "Bayesian Data
Analysis" is to draw the first two parameters from a Gamma and make a M-H
jump on the third. In PyMC, if I'm correct, that would imply defining the
two first parameters as "nodes", and the third one as a "parameter" in the
MetropolisHastings class. I would "compute" the nodes by drawing them using
gamma.rvs, and then compute the likelihood for the third parameter and let
PyMC take care of the rest.

If it works, (and it should!), I'll let Mr. Fonnesbeck know about it.


David



2006/1/25, Robert Kern <robert.kern at gmail.com>:
>
> David Huard wrote:
> > By the way, I'd like to thank you for all the work you're putting into
> > scipy and numpy.
>
> You're welcome.  :-)
>
> > The gaussian_kde class along with PyMC make Bayesian
> > analyses a breeze. It's easy to be productive when you work with such
> > good tools.
>
> Are you just trying to sample from the KDE? You can do it *much* easier
> and
> faster than MCMC using the .resample() method.
>
> --
> Robert Kern
> robert.kern at gmail.com
>
> "In the fields of hell where the grass grows high
> Are the graves of dreams allowed to die."
>   -- Richard Harter
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060126/7b22bab0/attachment.html>


More information about the SciPy-User mailing list