# Identifiability of Gaussian process

**URL:** <https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416>\
**Category:** Modeling\
**Created:** [November 23, 2021, 4:13pm UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416 "2021-11-23T16:13:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xxy](https://avatars.discourse-cdn.com/v4/letter/x/53a042/32.png) [@xxy](https://discourse.mc-stan.org/u/xxy)\
**Post date:** [November 23, 2021, 4:13pm UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416/1 "2021-11-23T16:13:18Z")

</div>

Hi community,

I have difficulty in understanding the last section of [10.3 Fitting a Gaussian process | Stan User’s Guide](https://mc-stan.org/docs/2_28/stan-users-guide/fit-gp.html), i.e. Multiple-output Gaussian processes.

 ![Screenshot 2021-11-23 at 16.06.15](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/b/bfa69baa8a1e91524c9778b21126a677f170668f.png)

In the screenshot, we need to set \alpha=1 to make parameters identifiable.

In the Stan code, \alpha is taken out accordingly by  
f = L\_K \* eta \* diag\_pre\_multiply(alpha, L\_Omega)’

```
model {
  matrix[N, D] f;
  {
    matrix[N, N] K = cov_exp_quad(x, 1.0, rho);
    matrix[N, N] L_K;

    // diagonal elements
    for (n in 1:N)
      K[n, n] = K[n, n] + delta;

    L_K = cholesky_decompose(K);
    f = L_K * eta
        * diag_pre_multiply(alpha, L_Omega)';
  }

```

Sorry that I don’t quite understand why taking \alpha outside of K will make the GP identifiable. And I cannot see the differences made to identifiability. Could anyone explain?

Thank you so much in advance!

EDIT: changed the link to point to the latest guide version (which has several typos fixed)

---

<div class="post-metadata">

**Author:** ![maxbiostat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/maxbiostat/32/1326_2.png) [@maxbiostat](https://discourse.mc-stan.org/u/maxbiostat)\
**Post date:** [November 23, 2021, 8:04pm UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416/2 "2021-11-23T20:04:10Z")

</div>

@avehtari @betanalpha

---

<div class="post-metadata">

**Author:** ![avehtari](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/avehtari/32/5935_2.png) [@avehtari](https://discourse.mc-stan.org/u/avehtari)\
**Post date:** [November 24, 2021, 9:39am UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416/3 "2021-11-24T09:39:44Z")

</div>

It looks like an unfortunate switch of variable names, and alpha in the code is part of C which is not explicitly constructed in the code (and thus alpha in the code is not the same as alpha in the equations). It would be good to edit that section and code to make it easier to compare equations and code.

---

<div class="post-metadata">

**Author:** ![xxy](https://avatars.discourse-cdn.com/v4/letter/x/53a042/32.png) [@xxy](https://discourse.mc-stan.org/u/xxy)\
**Post date:** [November 24, 2021, 10:16am UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416/4 "2021-11-24T10:16:25Z")

</div>

Thank you so much for your reply! But I’m still not sure why does moving \alpha outside of K and incorporating \alpha into C help with the model identifiability?

---

<div class="post-metadata">

**Author:** ![avehtari](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/avehtari/32/5935_2.png) [@avehtari](https://discourse.mc-stan.org/u/avehtari)\
**Post date:** [November 24, 2021, 10:26am UTC](https://discourse.mc-stan.org/t/identifiability-of-gaussian-process/25416/5 "2021-11-24T10:26:21Z")

</div>

We can consider that both K and C have their on alpha:  
K(\alpha\_K,\rho\_K)C(\alpha\_C,\eta\_C)=\alpha\_K \alpha\_C K(1,\rho\_K)C(1,\eta\_C)  
You can identify the product \alpha\_K \alpha\_C, but not \alpha\_K and \alpha\_C separately. So we can fix one of them. Now as \alpha\_C is a vector, it is natural to fix the scalar \alpha\_K=1.
