Hi all,<br><br>I'm having a bit of a weird problem with a searchlight MVPA I'm running, and I'm hoping someone out there can shed some light on what's happening. I'm running two MVPAs on my data, one where I pull out the data from each searchlight, calculate the mean for the searchlight, and subtract that value from each voxel in the searchlight, and another where I calculate the mean for the searchlight, then assign that value to each voxel in the searchlight (so I can look at classification ability due to differences in mean activation btwn categories separately from classification ability due to differences in the pattern of activation btwn categories.) The script where I subtract the mean from each voxel in the searchlight runs without incident on my data, but when I run the one where I'm assigning the searchlight mean to each voxel, the script runs fine until about the 2,000th searchlight and then it just....freezes. It doesn't throw an error; it just goes into the crossvalidation command and never comes out. It always stops on the same searchlight, so clearly there's something about the data in that searchlight that is tripping up the crossvalidation command, but I cannot figure out what. Has anyone else ever had something like this happen to them? Or have any idea what might cause a crossvalidation to freeze up like this (particularly one where you have essentially one piece of information--the searchlight mean--for each sample)? Here's the relevant code from the script:<br>
<br>def just_the_means(ds):<br> i = 0<br> while i < ds.shape[0]:<br> #assign the mean value to all voxels in the searchlight <br> ds.samples[i,:] = numpy.mean(ds.samples[i,:]) <br> i = i+1<br>
classifier = LinearCSVMC()<br> #perform a crossvalidation using the adjusted values<br> print "ABOUT TO PERFORM CROSSVALIDATION FOR A SEARCHLIGHT AT TIME " + str(datetime.datetime.now())<br> cvte = CrossValidation(classifier, NFoldPartitioner(), errorfx=lambda p, t: numpy.mean(p == t), enable_ca=['stats'])<br>
return cvte(ds)<br><br>#run the searchlight<br>s1 = sphere_searchlight(just_the_means, radius = 3)<br>just_the_means_results = s1(dataset)<br><br>I'd greatly appreciate any ideas you might have.<br><br>Best,<br>Sarah<br>
<br>