# Experiment for Latent Gaussian Models

**URL:** <https://discourse.mc-stan.org/t/experiment-for-latent-gaussian-models/5874>\
**Category:** Modeling\
**Created:** [October 4, 2018, 2:35pm UTC](https://discourse.mc-stan.org/t/experiment-for-latent-gaussian-models/5874 "2018-10-04T14:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![anon79882417](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@anon79882417](https://discourse.mc-stan.org/u/anon79882417)\
**Post date:** [October 7, 2018, 12:12am UTC](https://discourse.mc-stan.org/t/experiment-for-latent-gaussian-models/5874/6 "2018-10-07T00:12:26Z")

</div>

Hey @charlesm93 -

I’ve a few models that use “latent gaussian” that I’d like to see laplace approximation applied on if the C++ code working well enough. They IBNLT: classification (but this is in the manual), time series, and survival. I can send over the code, if you’re interested. The poisson model has been used in Betancourt’s case study and in Rob’s case study, I’d like to see diversity. For more information on GPs in survival analysis, Alan Saul’s dissertation is excellent, and a great read.

> [@charlesm93](#):
>
> Would it make sense to use a scientific example

Please take Aki’s suggestion, but I’m extremely interested in scientific examples too, and a survival one might make a good example (we can use it on a problem that’s already been done in GPstuff, to verify the results are accurate. I have most of this work done, and I can send over the code. I left off with the latent AFT survival component almost identical to the GPstuff vresion, but my latent function was jagged, and I was trying to impose constraints and combine kernels to see if I can extract the smooth component.).

And I link laplace approximation is a general optimization method and can be applied over a variety of models, and works particularly well for GPs.

> [@charlesm93](#):
>
> where Σϕ\Sigma\_\phi was a diagonal covariance matrix

We can have a dense covariance matrix with the covariance function describing the properties of the function (i.e. matern52 is less smooth than squared exponential). You generate the matrix with the covariance function, I haven’t put time into your proposed kernel. But - when we use a well known covariance function we can see how well it peforms on other well known models.

Although, admittedly, I’m blatantly ignoring prior distribution specification that can reduce sampling pathologies, as described in Betancourt’s case studies (i.e. the modeling in my case studies is trash), the following document might help you conceptualize the problem better. I’m aware of the problems, and I’m eager to fix, it’s just not a priority right now:

> [@Applied Gaussian Processes in Stan, Part 1. A Case Study](https://discourse.mc-stan.org/t/applied-gaussian-processes-in-stan-part-1-a-case-study/5442):
>
> Hey all - More specifically, hey GP people - Writing up some stuff I’ve done over the summer at Aalto (although a bit late…). Aiming for an applied, pedagogical intro to applied Gaussian Processes in Stan, using a variety of open source data sets. This is Part 1: Intro to GP notation, motivation behind GPs, some properties of kernels, GP regression and ARD. Some things I could use help with: Hyperparameter priors: I could at least use a length scale that uses the scale of the data, as in B…

---

_[View the full topic](https://discourse.mc-stan.org/t/experiment-for-latent-gaussian-models/5874)._
