Hi, I am using the marginal likelihood implementation of PyMC3 GP. How can I calculate the marginal likelihood for model comparison? My understanding is that model.logp(y) would give me the log posterior.

A bit unrelated, I tried calculating MLE for the GP model using flat priors and pm.find_MAP() but it doesn’t work because of inf or Nan values. The initial idea was to calculate BIC but as that cannot be done I want to calculate marginal likelihood for model comparison.

I was seeing bridge sampling notebook @junpenglao but then read The Harmonic Mean of the Likelihood: Worst Monte Carlo Method Ever. I know bridge sampling wouldn’t work here. As far as BIC is concerned, BIC GPy, here by Neil comments that theoretically it’s invalid for GPs as they assume correlation among parameters. After a lot of reading, I have got confused.

Any suggestion to compute BIC or Marginal likelihood would be appreciated!

Best Regards,

Rohan