The problem One of my tasks as head of our final undergraduate year on our Psychology MA/BSc programme is to allocate students to elective modules. We have in the order of 80-100 undergraduates in our final year, and ignoring their undergraduate dissertation, most of them must take 3 modules. There are exceptions however for joint […]
So I just read this great rant about Matlab by Olivia Guest, and it reminded me to update my previous rant about Matlab, so here it is. For the record, I don’t disagree with anything Olivia said, and I’m not overly defending Matlab. I am trapped in its local minima and am slowly reaching escape velocity, moving over […]
Posterior predictive checks The toolbox now calculates 2 measures of “goodness of fit” of the models. This is a useful quantitative reassurance that the models describe the participant discounting behaviour better than chance. In turn, this is important when we come to deciding which (if any) data files we should exclude. You can go and […]
I’ve just released Version 1.2 of the toolbox ‘Bayesian analysis toolbox for delay discounting.’ The main feature of this release was the addition of new models. For example, you can now estimate discount rates (ignoring the magnitude effect). So you can obtain estimates of the discount rate k, which is very useful if your primary […]
While I have some experience with probabilistic programming in the flavour of Bayesian Networks, and have published papers using them, I am interested in the super-class of generic probabilistic programs. That is, right now I am happy with conducting inference on Bayesian Networks, but I want to learn how to conduct inference on generic programs. As […]
So far we’ve had a look at rejection sampling and importance sampling. Here we take a quick look at slice sampling, although rather than implementing it ourselves, we will use the built in Matlab slicesample function. Using our parameter estimation example, we will use slice sampling to estimate the mean and sigma of some samples from […]
I’ve been using MCMC, but I’ve wanted to flesh out my knowledge and explore the space of sampling approaches a little more. One very simple, yet inefficient method, is rejection sampling. Here is a little Matlab example I put together after seeing how easy it was. %% true probability distribution true_func = @(x) betapdf(x,1+1,1+10); %% Do […]
Ideally, all research code should be made available at the point of submitting a paper. I’ve found that the way I write my research code has changed for the better now that I’ve made a commitment to making it open. However it can somewhat opaque and time consuming to understand, so how can we help those wanting to review, use, […]
I am happy to announce my 3rd paper of the year, accepted for publication in Behavior Research Methods. Following my initial foray into writing review papers (2 earlier this year), this is my first methods paper, and also my first contribution to higher-level decision making.
Vincent, B. T. (2015) A tutorial on Bayesian models of perception, Journal of Mathematical Psychology, 66:103–114.
I’ve just released a small bit of Matlab code on GitHub which helps automate the job of plotting posterior predictive distributions. If you are inferring posterior distributions of parameters of a 1D function (e.g. y=mx+c) then this code will plot the posterior predictive distribution for you. This should be handy for you to eyeball how well a model […]
If you’ve decided to join the increasing number of people using MCMC methods to conduct Bayesian inference, then one important decision is which software to use. This decision will be influenced by your programming language of choice, see Figure below. If you use Matlab, then really your best choice at the moment is JAGS. You use it […]
This is not a fair, even-handed review of all possible languages for all purposes. The intended audience is undergraduate psychology students who cannot code. What is coding? Why learn to code? Excellent arguments are made in this person’s blog post “Why every (psychology) student should learn to code“. The main points are: If you want […]
In the last few months I’ve decided to break off a ~15 year relationship with Matlab. We’ve been through many important times together and it’s not been an easy decision to make, but I think this is the best for both of us. Matlab saw me through my DPhil, helping me code up neural network […]
[UPDATE: February 2014] The files and instructions are now hosted on GitHub. Energy efficient receptive field code by Benjamin Vincent is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Unported License. This minimal set of MATLAB functions will set up a simple neural network to learn receptive fields. These receptive fields minimise an energy function which involves a) […]