[pymvpa] PyMVPA searchlight command is freezing up

Sarah Helfinstein shelfins at gmail.com
Mon Oct 1 15:35:15 UTC 2012


Hi all,

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:

def just_the_means(ds):
    i = 0
    while i < ds.shape[0]:
        #assign the mean value to all voxels in the searchlight
        ds.samples[i,:] = numpy.mean(ds.samples[i,:])
        i = i+1
    classifier = LinearCSVMC()
    #perform a crossvalidation using the adjusted values
    print "ABOUT TO PERFORM CROSSVALIDATION FOR A SEARCHLIGHT AT TIME " +
str(datetime.datetime.now())
    cvte = CrossValidation(classifier, NFoldPartitioner(), errorfx=lambda
p, t: numpy.mean(p == t), enable_ca=['stats'])
    return cvte(ds)

#run the searchlight
s1 = sphere_searchlight(just_the_means, radius = 3)
just_the_means_results = s1(dataset)

I'd greatly appreciate any ideas you might have.

Best,
Sarah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20121001/e3d82f37/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list