Gaussian Processes

18 views
Skip to first unread message

Rafael Calsaverini

unread,
Feb 23, 2009, 9:58:25 AM2/23/09
to py...@googlegroups.com
Hi,
anyone have some very simple example of the use of the GP package with pymc?

I'm trying to write a simple model in which I have the following process:

x(t+1) = x(t) - a V'(x(t))             (V'(x) denote the first derivative of V(x))

where V(x) is given by a gaussian process.  My aim is to have an estimate for the "potential function" V(x) given an orbit of values x(0), x(1), x(2), ... , x(T).

I'm imposing a gaussian process simply because I need a good sampler of "well behaved functions". I don't know if this is a reasonable thing to do.

I really didn't understood the model in the GP manual. It's a somewhat involved example for someone with no background about this things.

Does someone have a very simple example model that uses a couple of @stochastic variables from pymc together with gaussian process from GP?

Thanks in advance,

Rafael Calsaverini

Rafael Calsaverini

unread,
Feb 23, 2009, 10:00:56 AM2/23/09
to py...@googlegroups.com
Ops... I didn't write my equations right. I meant:

x(t+1) = x(t) - a V'(x(t))  + n(t)  

with n(t) a gaussian variable with zero mean and given variance, and V(x) a function from a gaussian process with given mean function (zero) and covariance function.



Rafael Calsaverini
=============

Telefones:  
Celular: (11) 7525-6222  
USP: (11) 3091-6803
Casa: (11) 3571-6435 - São Paulo

e-mail: rafael.ca...@gmail.com

Anand Patil

unread,
Feb 23, 2009, 10:39:22 AM2/23/09
to py...@googlegroups.com
Hi Rafael,


Assuming you know 'a' and have observed the x's, you can get a posterior for V in closed form. Start by thinking of V as a 'staircase function', whose values have a multivariate normal distribution, and note that V' is approximately D*V, D being a finite difference matrix. Then you have a linear model of the form

x(t+1) | y ~ N(b + c(t) V, ...)
V ~ N(0, C)

, where the vector c(t) can be got from x(t), D and a, all of which are known constants. The posterior for staircase V is a multivariate normal, and then you can refine the staircase until it becomes a Gaussian process.


If you have 'a' unknown or the x's observed with uncertainty, you can either 1) model V as a GP or 2) model it as a series of basis functions (sinusoids or Chebyshev polynomials, say, but they don't necessarily have to be orthogonal) with unknown coefficients. Be ready for long runs if the x's are observed with uncertainty, as mixing can be atrocious. If you can cut some corners to get a closed-form posterior like above I strongly recommend it.


BTW you're right about the introductory MCMC examples in the GP user guide having a steep learning curve, I'll have to update it when I get the chance. However I think pymc/examples/gp/PyMCModel.py shouldn't be too hard to understand, have you checked it out?


I'd be interested to hear how you get on if you don't mind keeping us posted.

Anand
Reply all
Reply to author
Forward
0 new messages