davidavdav / GaussianMixtures.jl

Large scale Gaussian Mixture Models
Other
95 stars 36 forks source link

[Question] - how to calculate the BIC of a mixture model #103

Closed 5tinzi closed 1 year ago

5tinzi commented 1 year ago

hi, I read the readme.md, I wonder if the "average log likelihood of the GMM given all data points" is equal to the "log-likelihood of the model"?

I wanna calculate a BIC , suppose I fit a model gmm = GMM(k,x),
then BIC = −2 * loglik + (log N ) * d., where loglik is the log-likelihood of the model, N is the number of datapoints and d is the number of parameters in the model.

so, is it OK to using avll(gmm::GMM, x::Matrix) as the loglik here?

I am not an expert in the field of statistics, any advice is appreciated.

davidavdav commented 1 year ago

It has been a while since I've been working with BIC, but looking at Wikipedia, your loglik is the total log-likelihood of the model, this would be N * avll.

5tinzi commented 1 year ago

Thanks, it works as expected.

Have a nice day.