Skip to content

Commit

Permalink
Update GLM Model Selection to best practices (pymc-devs#173)
Browse files Browse the repository at this point in the history
* [WIP] Update GLM Model Selection to best practices

* update with bambi

* commit: use separate dicts for linear and quadratic models

* update descriptions

* remove duplicate initialization of traces_lin and traces_quad

* fix and execute glm model selection notebook

* add glm tag

* add alt text to flying icon of level categories

Co-authored-by: Oriol (ZBook) <oriol.abril.pla@gmail.com>
  • Loading branch information
chiral-carbon and OriolAbril authored Jan 9, 2022
1 parent 3efe38f commit 0f69036
Show file tree
Hide file tree
Showing 5 changed files with 1,500 additions and 467 deletions.
2 changes: 1 addition & 1 deletion _templates/postcard_categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


{%- macro category_item(name, icon, active) -%}
<a href="{{ pathtocategory(name) }}" class="{{ setcolorclass(active) }}">
<a href="{{ pathtocategory(name) }}" class="{{ setcolorclass(active) }}" title="{{ name }}">
<span class="fas {{ icon }}"></span>
<label class="sr-only">{{ name }}</label>
</a>
Expand Down
1 change: 1 addition & 0 deletions examples/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def ipython_cell_transform(source):
intersphinx_mapping = {
"aesara": ("https://aesara.readthedocs.io/en/latest/", None),
"arviz": ("https://arviz-devs.github.io/arviz/", None),
"bambi": ("https://bambinos.github.io/bambi/main", None),
"mpl": ("https://matplotlib.org/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
Expand Down
1,915 changes: 1,449 additions & 466 deletions examples/generalized_linear_models/GLM-model-selection.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(GLM-robust-with-outlier-detection)=\n",
"# GLM: Robust Regression using Custom Likelihood for Outlier Classification\n",
"\n",
":::{post} 17 Nov, 2021\n",
Expand Down
48 changes: 48 additions & 0 deletions examples/references.bib
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
@article{ando2007bayesian,
title={Bayesian predictive information criterion for the evaluation of hierarchical Bayesian and empirical Bayes models},
author={Ando, Tomohiro},
journal={Biometrika},
volume={94},
number={2},
pages={443--458},
year={2007},
publisher={Oxford University Press},
doi={10.1093/biomet/asm017}
}

@misc{carpenter2016hierarchical,
title={Hierarchical partial pooling for repeated binary trials},
author={Carpenter, Bob and Gabry, J and Goodrich, B},
Expand Down Expand Up @@ -208,6 +220,18 @@ @article{silver2016masteringgo
url={https://doi.org/10.1038/nature16961}
}

@article{spiegelhalter2002bayesian,
title={Bayesian measures of model complexity and fit},
author={Spiegelhalter, David J and Best, Nicola G and Carlin, Bradley P and Van Der Linde, Angelika},
journal={Journal of the royal statistical society: Series b (statistical methodology)},
volume={64},
number={4},
pages={583--639},
year={2002},
publisher={Wiley Online Library},
doi={10.1111/rssb.12062}
}

@misc{szegedy2014going,
title={Going Deeper with Convolutions},
author={Christian Szegedy and Wei Liu and Yangqing Jia and Pierre Sermanet and Scott Reed and Dragomir Anguelov and Dumitru Erhan and Vincent Vanhoucke and Andrew Rabinovich},
Expand All @@ -229,6 +253,30 @@ @INPROCEEDINGS{vanderplas2012astroML
year={2012}
}

@article{vehtari2017practical,
title={Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC},
author={Vehtari, Aki and Gelman, Andrew and Gabry, Jonah},
journal={Statistics and computing},
volume={27},
number={5},
pages={1413--1432},
year={2017},
publisher={Springer},
doi={10.1007/s11222-016-9696-4},
eprint={1507.04544},
archivePrefix={arXiv},
primaryClass={stat.CO}
}

@article{watanabe2010asymptotic,
title={Asymptotic equivalence of Bayes cross validation and widely applicable information criterion in singular learning theory.},
author={Watanabe, Sumio and Opper, Manfred},
journal={Journal of machine learning research},
volume={11},
number={12},
year={2010}
}

@book{wilkinson2005grammar,
title={The Grammar of Graphics},
author={Wilkinson, Leland},
Expand Down

0 comments on commit 0f69036

Please sign in to comment.