# Modeling Gaussian process from multiple function observations?

**URL:** <https://discourse.pymc.io/t/modeling-gaussian-process-from-multiple-function-observations/951>\
**Category:** Questions\
**Created:** [March 14, 2018, 1:46am UTC](https://discourse.pymc.io/t/modeling-gaussian-process-from-multiple-function-observations/951 "2018-03-14T01:46:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allenq](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@allenq](https://discourse.pymc.io/u/allenq)\
**Post date:** [March 14, 2018, 1:46am UTC](https://discourse.pymc.io/t/modeling-gaussian-process-from-multiple-function-observations/951/1 "2018-03-14T01:46:31Z")

</div>

I have ~ 1000 timeseries, each 100 timesteps long.

I’d like to use each timeseries as a function observation of the same Gaussian process. Then, given a new timeseries of just the first 10 timesteps, generate samples from the gaussian process conditioned on the new data.

Is this feasible in pymc3? Are there any examples to help get started?

It looks like the below discourse topic attempted something similar, but the link to jupyter notebook containing an example is now missing and, since that topic, a new MatrixNormal class has been created.

> [@Multiple (uncertain) function observations of the same Gaussian process](https://discourse.pymc.io/t/multiple-uncertain-function-observations-of-the-same-gaussian-process/400/15):
>
> That looks fantastic!! I think it would be awesome if you could submit this as a PR! I think you can put this into pymc3/distributions/multivariate.py. Yes, everything looks perfect in your notebook. Githubs a better place to go over code, so we can go over this more there. I’ve been wanting to add this for a while, but haven’t gotten around to it. With a MatrixNormal distribution, it should be pretty straightforward to add a few more GP implementations, maybe called Marginal2D and Latent2…

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [March 14, 2018, 6:36am UTC](https://discourse.pymc.io/t/modeling-gaussian-process-from-multiple-function-observations/951/2 "2018-03-14T06:36:03Z")

</div>

Yes this is possible, there are some codes in the post you mentioned that should give you a good start.

Also, since your observed is generated from the same GP, you dont need MatrixNormal class for it.
