Description
Notebook proposal
New example for handling ordinal predictor features
Why should this notebook be added to pymc-examples?
The current example notebook for ordinal regression
GLM-ordinal-regression.ipynb
shows how to handle ordinals in the target (endogenous) feature, but not in the predictor (exogenous) feature(s).
I wanted to treat an ordinal feature in a model myself and dug up an old example by Austin Rochford, itself based on a 2018 paper by Burkner & Charpenitier. The example was good, but I thought I'd take the opportunity
to build out a full workflow, add more explanations and include in pymc-examples
Suggested categories:
- Level: Beginner
- Diataxis type: Reference
Related notebooks
- Loosely related to GLM-ordinal-regression.ipynb although very different
- Even more loosely related to binning.ipynb which seems to have a vaguely similar problem statement
References
If applicable, references and material that could help in writing the notebook.
@Article{burkner2018,
title = {Modeling Monotonic Effects of Ordinal Predictors in Bayesian Regression Models},
author = {Bürkner, P., & Charpentier, E.},
year = {2018},
journal = {PsyArXiv},
url = {https://doi.org/10.31234/osf.io/9qkhj},
doi = {doi:10.31234/osf.io/9qkhj},
}
@online{rochford2018,
author={Austin Rochford},
url={https://austinrochford.com/posts/2018-11-10-monotonic-predictors.html},
}
@Article{gelman2020bayesian,
title = {Bayesian workflow},
author = {Gelman, Andrew and Vehtari, Aki and Simpson, Daniel and Margossian, Charles C and Carpenter, Bob and Yao, Yuling and Kennedy, Lauren and Gabry, Jonah and B{"u}rkner, Paul-Christian and Modr{'a}k, Martin},
journal = {arXiv preprint arXiv:2011.01808},
year = {2020},
url = {https://arxiv.org/abs/2011.01808}
}