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

GLM model selection

Open OriolAbril opened this issue 3 years ago • 9 comments

File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-model-selection.ipynb Reviewers:

The sections below may still be pending. If so, the issue is still available, it simply doesn't have specific guidance yet. Please refer to this overview of updates

Known changes needed

Changes listed in this section should all be done at some point in order to get this notebook to a "Best Practices" state. However, these are probably not enough! Make sure to thoroughly review the notebook and search for other updates.

General updates

ArviZ related

Changes for discussion

Changes listed in this section are up for discussion, these are ideas on how to improve the notebook but may not have a clear implementation, or fix some know issue only partially.

General updates

ArviZ related

Notes

Exotic dependencies

Computing requirements

OriolAbril avatar Mar 30 '21 23:03 OriolAbril

I tried moving from nbsphinx to myst-nb and was unable to do so because the widgets in this notebook are not saved correctly, see https://github.com/jupyter/jupyter-sphinx/blob/master/jupyter_sphinx/ast.py#L607. After manually editing the metadata to remove the widgets completely I was able to build the documentation.

Side note: the DE-MCMC notebooks also have widgets but they are correctly saved are are not a problem.

OriolAbril avatar Jun 08 '21 09:06 OriolAbril

@OriolAbril can I work on this?

chiral-carbon avatar Jun 08 '21 09:06 chiral-carbon

Great!

OriolAbril avatar Jun 08 '21 11:06 OriolAbril

This could do with some simplification to focus on the core aspects of model comparison. Specific proposals:

  • remove interactive aspects of this notebook. They only work when running locally, not when viewing on the website. And in fact it is pretty clunky when I run the ipywidgets locally. Seems like a distraction.
    • remove interactive the dataset viewing
    • remove the interactive posterior plot viewing and just show static posterior predictions
  • remove plot_annotated_trace and just use az.plot_trace
  • why are we sometimes using raw data, sometimes the standardised data?

drbenvincent avatar Jun 17 '22 22:06 drbenvincent

Always in favour of simplifying notebooks to have a clearer and more to the point scope. My main concern (not remembering the content of either notebook right now so tread lightly) is that it might end up being too similar to https://www.pymc.io/projects/docs/en/stable/learn/core_notebooks/model_comparison.html

OriolAbril avatar Jun 18 '22 21:06 OriolAbril

Good point. Could potentially be expanded to include model comparison by Savage Dickey method perhaps

drbenvincent avatar Jun 19 '22 13:06 drbenvincent

I didn't actually realise there were these separate core notebooks.

I think it's very cool to have these core notebooks under "Learn". But I think these notebooks should additionally be visible along with the regular pymc example notebooks. Some people might go straight to the Examples and not know about the extra ones under Learn.

Can I propose that these core notebooks stay where they are, but are additionally available with the rest of the Example notebooks?

drbenvincent avatar Jun 19 '22 13:06 drbenvincent

But I think these notebooks should additionally be visible along with the regular pymc example notebooks

Yes, they should be listed at the top of the gallery page. We can use cards manually with sphinx-design

OriolAbril avatar Jun 19 '22 14:06 OriolAbril

I'll submit an issue and PR for this. Hopefully in the next few days.

drbenvincent avatar Jun 19 '22 14:06 drbenvincent