Gathering some suggestions: - Patsy for model matrix encoding https://patsy.readthedocs.io/en/latest/overview.html - GLM implementation in `pymc3` https://docs.pymc.io/notebooks/GLM-poisson-regression.html