A model which is a function of some other data

33 views
Skip to first unread message

Jeremy Sanders

unread,
Feb 24, 2009, 5:47:55 AM2/24/09
to PyMC
Hi - I have as follows:

Datasets D1 (like flux) and D2 (temperature). Each dataset has
Gaussian uncertainties on each of its values. The uncertainties on D1
are quite a lot smaller than D2.

They are actually computed from the same raw data, but they are
hopefully mostly independent. In the future I'd like to work from the
raw data but it is quite hard to convert the raw data to D2 (it uses a
number of 3rd party tools).

I have a model (with parameters) which converts from flux (D1) to
temperature (D2). What I'd like to do is take the two different
datasets and compute the model parameters and uncertainties.

If I ignored the uncertainties on D1 then the problem would be fairly
easy to do with MCMC, I suspect. Is it possible to set up a model
which can take one sort of data to predict another with PyMC?

Thanks

Jeremy

David Huard

unread,
Feb 24, 2009, 9:37:27 AM2/24/09
to py...@googlegroups.com
Jeremy,

It's certainly possible, I've done something along these lines for an hydrological model:http://www.agu.org/pubs/crossref/2008/2007WR005949.shtml using pymc.

When taking errors into account for D1, what you do is assume there exists a set of unknown true values T1. These true values are related both to the data D1 through your gaussian error distribution, and to the D2 dataset through the model, model parameters and output uncertainty.

D1 = T1 + gaussian_error
D2 = Model(T1, parameters) + gaussian_error (standing for both output data uncertainty and model uncertainty)

In pymc, you'd then have two sets of @stochastic objects: the parameters, and all the true input values. You'd have also two sets of @observed stochastic: D1 and D2.
It is also useful to define the model as a @deterministic object.

HTH,

David

Jeremy Sanders

unread,
Feb 24, 2009, 10:38:47 AM2/24/09
to PyMC


On Feb 24, 2:37 pm, David Huard <david.hu...@gmail.com> wrote:
> It's certainly possible, I've done something along these lines for an
> hydrological model:http://www.agu.org/pubs/crossref/2008/2007WR005949.shtmlusing
> pymc.

Thanks - that's helpful... I'll work on it.

Jeremy
Reply all
Reply to author
Forward
0 new messages