I have posted a set of functions to fit GLMs with Gaussian priors on Matlab Central. GLMs are a class of models in which an internal variable is contructed linearly from regressors, ie, , and the observed variable is generated from the internal variable through a non-Gaussian noise process. GLMs include standard linear regression, Poisson regression, and logistic regression models as special cases. These three models are very useful in the estimation of neuronal receptive fields. The variable can be fitted by maximizing the likelihood of the data with respect to the model parameters; the built-in MatlabÂ function `glmfit`

does this . This approach is prone to overfitting, however.

Using a prior on and finding the maximum a posteriori estimate of alleviates overfitting. Gaussian priors of the form allow the expression of prior knowledge that the weights are of small magnitude (A = I) or that the weights are smooth (A = D, a second order finite difference operator), for example. The set of functions allow the determination of the hyperparameter through k-fold cross-validation.

### Like this:

Like Loading...

*Related*

## 3 thoughts on “Generalized linear models with Gaussian priors in Matlab”