[pymvpa] Error running dissimilarity analysis

Michael W. Cole mwcole at gmail.com
Thu Dec 17 23:52:54 UTC 2009


Hi Michael,

I tried running the script on other datasets and they seem to work fine.
I've run into this sort of thing several times so far with PyMVPA (i.e.,
cases where a classifier will run for one subject but crash for others).

Did you inspect the dataset that it is somewhat "sane"? What does
>  print blockavged_dataset.summary() say?
>

Yes, the data looks fine. In fact, I've run the same data with several other
classifiers and they worked fine. Further, the data will run with the
searchlight for several spheres, and only crash when it hits an especially
small one (4 voxels). I'm not sure if it's an issue with the number of
voxels or not. (I imagine it must've hit similarly small feature sets for
the other subjects it worked for.)

Any idea what could be causing this?

Michael





On Wed, Dec 16, 2009 at 4:15 PM, Michael Hanke <michael.hanke at gmail.com>wrote:

> Hey,
>
> [ sorry for the delay ]
>
> On Wed, Dec 16, 2009 at 12:04:28PM +0100, Valentin Haenel wrote:
> > Would anyone of the senior developers like to comment on this, please.
>
> You're senior too -- no? ;-)
>
> > * Michael W. Cole <mwcole at gmail.com> [091214]:
> > > Hello Valentin,
> > >
> > > Thanks for the reply.
> > >
> > > I'm including the requested info:
> > > PyMVPA 0.4.3 on Fedora 10 x86_64.
> > >
> > > Here is the relevant part of the script:
> > >
> > >     blockavged_dataset = NiftiDataset(samples=niftiFile,
> > > >         labels=attrs.labels, chunks=attrs.chunks, labels_map={'cat1':
> 0,
> > > > 'cat2': 1, 'cat3': 2, 'cat4': 3, 'cat5': 4},
> > > >         mask=maskFile)
> > > >
> > > >     # remove first category from dataset
> > > >     blockavged_dataset = blockavged_dataset.selectSamples(N.array([l
> != 0
> > > > for l in blockavged_dataset.labels],
> > > >                                             dtype='bool'))
> > > >
> > > >     """Create a dissimilarity matrix based on the labels of the data
> points
> > > >     in our test dataset.  This will allow us to see if there is a
> > > > correlation
> > > >     between any given searchlight sphere and the experimental
> > > > conditions."""
> > > >
> > > >     # create dissimilarity matrix using the 'confusion' distance
> > > >     # metric
> > > >     dsm = DSMatrix(blockavged_dataset.labels, 'confusion')
> > >
> > >
> > >     #
> > > >     # Run Searchlight
> > > >     #
> > > >
> > > >     # choose classifier
> > > >     dsmetric = DSMDatasetMeasure(dsm, 'pearson', 'pearson')
> > > >
> > > >     for radius in [6.4,9.6]:
> > > >
> > > >         # tell which one we are doing
> > > >         print "Running searchlight with radius: %.2fmm..." % (radius)
> > > >
> > > >         # setup Searchlight with a custom radius
> > > >         # radius has to be in the same unit as the nifti file's
> pixdim
> > > >         # property.
> > > >         sl = Searchlight(dsmetric, radius=radius)
> > > >
> > > >         # run searchlight on example dataset and retrieve error map
> > > >         sl_map = sl(blockavged_dataset)
>
> From just looking at it I have no clue what is wrong. Except for the
> dataset used this code is almost identical to the searchlight_dsm.py
> example. Does that one run for you?
>
> Did you inspect the dataset that it is somewhat "sane"? What does
>
>  print blockavged_dataset.summary()
>
> say?
>
>
> Michael
>
>
> --
> GPG key:  1024D/3144BE0F Michael Hanke
> http://mih.voxindeserto.de
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>



-- 
Michael W. Cole, Ph.D.
Post-doctoral researcher
Cognitive Control & Psychopathology Lab
Washington University in St. Louis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20091217/d19963e2/attachment.htm>


More information about the Pkg-ExpPsy-PyMVPA mailing list