Code

This page contains code and data for a number of the figures in the book.  This code uses a mixture of different programs, including MATLAB (.m), R (.R), python (.py), and unix shell scripts (.sh).  In addition, some examples include data, and are provided as gzipped tar archives (.tgz).  

Note that in many cases the code does not create the figure exactly as printed; there may have been further editing of the images to create the final figures.  However, this code should in general demonstrate the principles underlying the figures.

Prerequisites:

MATLAB
  • Several programs require spm_hrf() from the SPM package
  • Several programs require the MATLAB Statistics Toolbox
  • Figure 8.4 requires the FastICA package for MATLAB
R
  • Several programs require the matlab package for R
  • Figure 8.11 requires the sna and WGCNA packages for R
  • Figure 9.2/9.3 require the e1071 and randomForest packages for R


SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Download
An example of Fourier analysis.  1k v. 2 Mar 25, 2011, 2:48 PM Russ Poldrack
ċ

Download
An example of convolution.  1k v. 2 Mar 25, 2011, 2:48 PM Russ Poldrack
ċ

Download
Examples of linear transforms.  4k v. 2 Mar 25, 2011, 2:49 PM Russ Poldrack
ċ

Download
A depiction of aliasing  442k v. 2 Mar 25, 2011, 2:49 PM Russ Poldrack
ċ

Download
A depiction of the effects of slice timing on the acquired data.  1k v. 2 Mar 25, 2011, 2:49 PM Russ Poldrack
ċ

Download
A depiction of slice timing correction.  1k v. 2 Mar 25, 2011, 2:49 PM Russ Poldrack
ċ

Download
Data for a comparison of activation maps between linear (FLIRT) and nonlinear (FNIRT) registration  314k v. 2 Mar 25, 2011, 2:50 PM Russ Poldrack
ċ

Download
Code for making figure 5.10 showing the effect of upsampling time series prior to convolution.  2k v. 1 Jun 13, 2011, 1:26 PM Jeanette Mumford
ċ

Download
Code for creating figure 5.11, illustrating how parametrically modulated regressors are created.  1k v. 1 Jun 13, 2011, 1:27 PM Jeanette Mumford
ċ

Download
Data and code for creating figure 5.12, illustrating orthogonalization of regressors.  2k v. 1 Jun 13, 2011, 1:28 PM Jeanette Mumford
ċ

Download
Code for creating figure 5.3, which shows linear time invariance examples  1k v. 1 Jun 13, 2011, 1:24 PM Jeanette Mumford
ċ

Download
Network analysis example  108k v. 3 Mar 25, 2011, 2:51 PM Russ Poldrack
ċ

Download
Example of design matrix for beta-series correlation  2k v. 2 Mar 25, 2011, 2:51 PM Russ Poldrack
ċ

Download
Example of overfitting  3k v. 2 Mar 25, 2011, 2:55 PM Russ Poldrack
ċ

Download
Comparison of classifiers on data with a linear class boundary  10k v. 2 Mar 25, 2011, 2:56 PM Russ Poldrack
ċ

Download
Comparison of classifiers on data with a nonlinear class boundary  10k v. 2 Mar 25, 2011, 2:56 PM Russ Poldrack
Comments