GR5293 Applied Machine Learning for
Instructor: Xiaofu He
Department of Statistics & Data Science Institute
Assignment: practice analyzing an
auditory fMRI data
1) Practice analyzing an auditory fMRI data, which was
collected by Geraint Rees, UK.
2) Download the dataset from the Coursework, which
includes functional fMRI data (i.e., in the folder named
“fM00223” ) and T1 weighted data (i.e., in the folder
named “sM00223”), and unzip the dataset to the same
directory as the script file.
3) Follow the instructions in SPM 12 manual Chapter 30 (you
can skip the section of “30.4.8 Plotting responses at a
voxel”, which is optional) to process the auditory fMRI
4) Explain the results of the experiment in details and discuss
the limitation for each step
• One Matlab file, i.e., combine all steps into one script, which must be runnable (we
won’t debug for you).
OR turning in separate scripts for the assignment, which should include the
following: realign.m, coregister.m, segment.m, normalise_functional.m,
normalise_structural.m, smooth.m, specify.m, estimate.m, and SPM.mat (in the
• Please provide a detailed report file (UNI_Name_Assignment2.report)
– For each Pre-processing step (Realignment – Smoothing), answer the following
questions in detail in YOUR OWN WORDS
• What’s this step doing? Why do we need this?
– Explain the results of the experiment in your own words by referring to the
figures you generated (e.g., explain the finding on Figure 30.19).
– Discuss the limitation(s) of the data procedures. How can you improve it?
Submit to the coursework, due on Nov 13th (11:59PM)
• For each figure shown in the manual, you should submit an equivalent figure you
generate. Save the figure with the corresponding name shown in the manual (e.g.
Figure 30.2). You DO NOT need to provide figures for Figure 30.1, 30.9 30.11,
30.12, 30.14, 30.16, 30.17, 30.18, 30.20, 30.21. Save all your images in a folder
• DO NOT submit the dataset. There are 5 folders in total, i.e., classical, dummy,
fM00223, jobs,sM00223, and Figures (as PNG or JPEG), but ONLY submit the
‘jobs’, ‘Figures’ folders, and SPM.mat in the ‘classical’ folder.
• Compress all files and folder into a single compressed file with
UNI_Name_Assignment2.zip/.rar as its name
1. You should use relative path in your script
e.g., use ‘/sM00223/sM00223_002.img,1’ instead of
similarly use ‘/fM00223/fM00223_016.img,1’ for the fMRI data
For the build-in file/function was used such as
‘/Users/username/spm12/tpm/TPM.nii,6’, please use
Hint: After you save the batch file as .m script, you can search and
replace those paths with a relative path instead of manually changing
all scans path.
2. The results you generated might be little different from the manual, which is
3. Make sure you do not miss out any part before you submit
4. Before submission, run your merged script (if you choose to submit one
Matlab file instead of separate files) on the dataset and make sure it runs to
the end without problem. After replacing the absolute path with a relative
one, the scripts won’t work which is fine.
5. If you have any question, post it on piazza as a public question.
• SPM 12 manual Chapter 30 (you can skip
section of “30.4.8 Plotting responses at a voxel
“, which is optional)