# GP marginal likelihood with white noise/Latent GP

**URL:** <https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369>\
**Category:** Questions\
**Created:** [May 31, 2019, 8:52pm UTC](https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369 "2019-05-31T20:52:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/amit/32/2027_2.png) [@amit](https://discourse.pymc.io/u/amit)\
**Post date:** [May 31, 2019, 8:52pm UTC](https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369/1 "2019-05-31T20:52:54Z")

</div>

Is the marginal likelihood of GP with white noise the same as having a normal distribution with mean as a latent GP? I ask this because the first case seems to sample faster than the second case. Wondering if this is because the latent variable is marginalized out in the first case.

---

<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:** [June 1, 2019, 5:24am UTC](https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369/2 "2019-06-01T05:24:03Z")

</div>

I think they are the same, as for speed differences maybe @bwengals has some idea.

---

<div class="post-metadata">

**Author:** ![bwengals](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/bwengals/32/1237_2.png) [@bwengals](https://discourse.pymc.io/u/bwengals)\
**Post date:** [June 1, 2019, 6:03am UTC](https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369/3 "2019-06-01T06:03:53Z")

</div>

Yes, your guess is exactly right. If you check what’s in the trace you’ll see the GP there for the `Latent` case, but not the `Marginal` case.

---

<div class="post-metadata">

**Author:** ![amit](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/amit/32/2027_2.png) [@amit](https://discourse.pymc.io/u/amit)\
**Post date:** [June 3, 2019, 6:22pm UTC](https://discourse.pymc.io/t/gp-marginal-likelihood-with-white-noise-latent-gp/3369/4 "2019-06-03T18:22:02Z")

</div>

Thank you very much.
