pymc-examples icon indicating copy to clipboard operation
pymc-examples copied to clipboard

Update GP-Latent.ipynb to v4

Open bwengals opened this issue 1 year ago • 3 comments

Update GP-Latent.ipynb to V4

This notebook was previously merged (see discussion in #371) but was overwritten. This PR re-adds it.

bwengals avatar Aug 09 '22 00:08 bwengals

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2022-08-09T04:13:12Z ----------------------------------------------------------------

Line #8.    f_post = idata.posterior["f"].stack(samples=["chain", "draw"]).T

If you use the current arviz development version you can do

f_post = az.extract(idata, var_names="f").transpose("sample", ...)

I assume plot_pg_dist wants the sample dimension to be the first one.


bwengals commented on 2022-09-28T19:14:32Z ----------------------------------------------------------------

Yup it does. plot_gp_dist really needs to be updated to work with InferenceData objects. Really like az.extract, though I have to brag that I'm pretty fast now at typing idata.posterior.thing.stack(sample=['chain', 'draw'])

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2022-08-09T04:13:13Z ----------------------------------------------------------------

can you add a watermark title right above the watermark code cell? and the -p aesara,aeppl,xarray flag. Ref: https://www.pymc.io/projects/docs/en/stable/contributing/jupyter_style.html


bwengals commented on 2022-09-28T19:13:09Z ----------------------------------------------------------------

Ah yup, added

Ah yup, added


View entire conversation on ReviewNB

bwengals avatar Sep 28 '22 19:09 bwengals

Yup it does. plot_gp_dist really needs to be updated to work with InferenceData objects. Really like az.extract, though I have to brag that I'm pretty fast now at typing idata.posterior.thing.stack(sample=['chain', 'draw'])


View entire conversation on ReviewNB

bwengals avatar Sep 28 '22 19:09 bwengals