Noninformative prior for GP mean

82 views
Skip to first unread message
Message has been deleted

John McFarland

unread,
Jan 9, 2011, 7:14:43 PM1/9/11
to py...@googlegroups.com
I was just doing some quick testing of fitting GP models with MCMC and
am seeing some strange behavior when I try to approximate a
noninformative prior with a Normal distribution having a very large
variance. I'm still learning pymc, so there's a good chance I'm doing
something wrong.

Basically I'm just fitting a GP model to some data, and I'm modeling the
GP as having a constant but unknown mean (call it beta). The data were
generated from a GP with 0 mean. When I use the Uninformative prior
distribution object, I get the expected results: the marginal posterior
for beta is pretty much centered at 0 and shows support over about -2,2.
Just to try and understand how some of the other pymc distribution
objects worked, I also tried approximating a non-informative prior with
Normal(0, 0.00001) -- this should be a flat prior so I would expect it
to be a reasonable approximation to a constant prior. However, with
this prior, the marginal posterior for beta is much different, showing
support over roughly -2000,2000.

Am I missing something?

I'm attaching the code and small data file.

Thanks,
John

fit-gp.py
train.txt

Anand Patil

unread,
Jan 10, 2011, 7:05:11 AM1/10/11
to py...@googlegroups.com
Hi John,

Thanks for the report. This isn't a GP-specific problem. The proximal cause is that GPSampler was mistakenly taking beta as dataless when assigning step methods, meaning it can be safely sampled from its conditional prior.

Issue http://code.google.com/p/pymc/issues/list?thanks=346&ts=1294660820 traces through to the original bug, which is a pretty nasty one. We'll get it fixed ASAP.

Anand

-2.000000 -0.416758
-1.428571 -1.562763
-0.857143 -2.934006
-0.285714 -2.772527
0.285714 -1.255265
0.857143 0.437696
1.428571 0.410467
2.000000 -0.056267

--
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.



Reply all
Reply to author
Forward
0 new messages