Toolbox for inference in generalized linear models for spiking neurons

Overcomplete basis
Illustration of the generative encoding model associated with a GLM.

Files (300 KB)


This toolbox provides means for inference in generalized linear models for spiking neurons. This includes calculating MAP estimates for L1 and L2 priors as well as approximations to the posterior moments based on the Expectation Propagation algorithm.


a) Make sure the MinFunc toolbox is installed. Available at

b) Install the lightspeed toolbox (actually only normcdfln.m is needed).

c) Unpack the archive.
tar -xvzf glmToolBox.tar.gz

d) If necessary, compile the mex-code. Compiled versions for Windows (32bit) and Linux (64bit) are contained in the archive.
cd ./GLMToolBox/code/mexCode/
make install


a) Execute adjustPath from the main-directory before using any of the code.

b) See examples for basic usage. Scripts are located in <main-directory>/exampleScripts/.


The code is published under the GNU Gneral Public License ( The code is provided "as is" and has no warranty whatsoever.


S. Gerwinn, J. Macke, and M. Bethge
Bayesian inference for generalized linear models for spiking neurons
Frontiers in Computational Neuroscience, 4, 2010
#bayesian inference, #generalized linear model, #spiking neurons
Code, URL, DOI, PDF, BibTex
University of Tuebingen BCCN CIN MPI