Gaussian Process

I am wondering if its possible to implement the following model using PYMC library
Screenshot 2023-08-11 000047

For sure! We have a description of how the Gaussian process module works here Gaussian Processes — PyMC 5.7.2 documentation and several tutorials. My favourite introductory tutorial is this one Gaussian Processes: Latent Variable Implementation — PyMC example gallery

1 Like

Thank you for your reply.
I recieved the following warning

C:\Users\GTS\anaconda3\envs\pymc_env\Lib\site-packages\pymc\sampling\mcmc.py:243: UserWarning: Use of external NUTS sampler is still experimental
  warnings.warn("Use of external NUTS sampler is still experimental", UserWarning)

Does the warning means that the sampler is not efficient or accurate?

I wouldn’t think so. The external NUTS samplers are fairly mature at this point. Nutpie, blackjax and numpyro are almost always faster than the standard pymc implementation of NUTS and very accurate.

People still occasionally run into bugs when moving between architectures, like some models don’t port to JAX for sampling. You can skim the bug reports related to numpyro (for example) if you are worried something might be breaking. Otherwise, you should be okay.

3 Likes

I think that’s McElreath’s Rethinking lecture 16 example. Maybe you have already written it down in PyMC, but just in case it helps, there’s a PyMC repo with Rethinking 2 translated to PyMC. Code 14.49 may be useful to you: https://github.com/pymc-devs/pymc-resources/blob/main/Rethinking_2/Chp_14.ipynb

1 Like

What does the mixedmean function do? If you could post the code for that it might help