In this page we will show how to use simple logistic regression to classify the fMRI data from Haxby et al. This requires two toolboxes:
You may also use this m-file as a kick-starter. The data example is preprocessed (i.e., detrended, z-scored, ) by our approach described in preprocessing toolbox. The data in mat-format is available here.
Logistic regression is naturally a binary classification algorithm, but somehow can be cast as multi-class classification algorithm by adopting one-vs-all (one-vs-rest) strategy. Another possible strategy is pair-wise classification. Personally I prefer one-vs-all over pairwise because the latter one need to classify K(K-1)/2 (K choose 2) times as opposed to K times in the former approach which is implemented in our code.
The accuracy is 77.5% when using 50% of the data instances (40/80) to train and test on the rest (40/80). The accuracy achieves 87.5% when using 72/80 to train the model and test on the rest 8/80.