Skip to content

Bayesian Logistic Regression using Laplace approximations to the posterior.

License

Notifications You must be signed in to change notification settings

robhaslinger/bayes_logistic

 
 

Repository files navigation

Bayes Logistic Regression

Note written on 4/28/2021

I wrote the core algorithms of this package back when I worked at MaxPoint Interactive. So basically the code in bayes_logistic/bayes_logistic.py file and the demo notebook notebook/bayeslogisitic_demo.ipynb. My co-worker Marius Van Niekerk did all the packaging and made it pip installable pip install bayes_logistic. I haven't touched it since then but decided to fork it to my personal repository for posterity. There seem to have been a few minor changes since I worked on this, for example the parkinsons_sample.ipynb notebook but the core functionality was mine and seems unchanged.

Overview

This package will fit Bayesian logistic regression models with arbitrary prior means and covariance matrices, although we work with the inverse covariance matrix which is the log-likelihood Hessian.

Either the full Hessian or a diagonal approximation may be used.

Individual data points may be weighted in an arbitrary manner.

Finally, p-values on each fitted parameter may be calculated and this can be used for variable selection of sparse models.

Demo

Example Notebook

About

Bayesian Logistic Regression using Laplace approximations to the posterior.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 94.2%
  • Python 5.5%
  • Makefile 0.3%