I am trying to understand this tutorial on multivariate GMM in STAN for which the code can be seen below.

Where can I read a documentation about multi_normal_cholesky_lpdf ? Or what it does exactly ?

I did a Google search on “multi_normal_cholesky_lpdf”, but I only got STAN source code as result :) . I cannot really read very well C++ :(

Is there some way to figure out what “multi_normal_cholesky_lpdf” means ?

Regards,

Jozsef

data {
int D; //number of dimensions
int K; //number of gaussians
int N; //number of data
vector[D] y[N]; //data
}
parameters {
simplex[K] theta; //mixing proportions
ordered[D] mu[K]; //mixture component means
cholesky_factor_corr[D] L[K]; //cholesky factor of covariance
}
model {
real ps[K];
for(k in 1:K){
mu[k] ~ normal(0,3);
L[k] ~ lkj_corr_cholesky(4);
}
for (n in 1:N){
for (k in 1:K){
ps[k] = log(theta[k])+multi_normal_cholesky_lpdf(y[n] | mu[k], L[k]); //increment log probability of the gaussian
}
target += log_sum_exp(ps);
}
}

I often turn to mc-stan.org/math as a first reference for the Stan language. I think the presentation is often more direct to the code that what is found in the documentation.