Use the searchlight with a neighborhood and a measure¶
‘I love it when a plan comes together’¶
In this exercise we integrate concepts and techniques described during previous exercises:
to compute a whole brain information map using a Neighborhood that indicates where in the brain, locally, regions contain information about the conditions of interest (
Using cosmo fmri dataset, load the t stats for ‘odd’ and ‘even’ runs for s01 (
glm_T_stats_even.nii), while supplying the
brain mask. Assign chunks and targets and stack the two halves into a single dataset
Using cosmo spherical neighborhood, define a spherical neighborhood with a radius of 3 voxels for each feature (voxel) in
ds. Show a histogram of the number of features (voxels) in each element in the neighborhood.
Then, using cosmo correlation measure and the cosmo searchlight function, compute a whole-brain information map, visualize the result using cosmo slice, and store the result as a NIFTI file using cosmo map2fmri. The NIFTI file can be visualized with any fMRI analysis package; one simple program is MRIcron.
Part 2 is optional; it is used to illustrate that a whole-brain searchlight can be applied with different measures.
Load the dataset with subject
s01’s t-statistic for every run (
glm_T_stats_perrun.nii) using the
brain mask and assign chunks and targets.
Using cosmo spherical neighborhood, define a spherical neighborhood with at least 100 voxels for each feature (voxel) in
Use cosmo oddeven partitioner to define a cross-validation scheme, and use cosmo crossvalidation measure and the cosmo searchlight function to compute a whole-brain information map with classification accuracies, visualize the result using cosmo plot slices, and store the result as a NIFTI file using cosmo map2fmri.