[pymvpa] Representational Similarity Analysis example does not work

Jason Hubbard hubbard3 at uoregon.edu
Wed Jun 19 21:58:41 UTC 2013


Hello, 

I tried running the example for computing a dissimilarity matrix measure found here: http://www.pymvpa.org/examples/searchlight_dsm.html (file is here: https://github.com/PyMVPA/PyMVPA/blob/master/doc/examples/searchlight.py)

When trying to run the example file searchlight_dsm.py, I get an error at this line: 

# setup searchlight with 5 mm radius and measure configured above
sl = Searchlight(dsmetric, radius=5)

It says that Searchlight is expecting 3 arguments, but only received 2. Sifting through the code for the Searchlight class, it seems that the missing argument it is expecting "queryengine". I'm wondering whether the class was updated after this example was posted. I'm unclear what the query engine is and how exactly I pass that argument to Searchlight. I have been unable to find those details in the documentation. I am somewhat of a newbie to both python and PyMVPA. 

Another example, searchlight_surf.py, uses Searchlight with the queryengine argument:

qe = disc_surface_queryengine(radius, epi_fn,
                              white_surf_fn, pial_surf_fn,
                              source_surf_fn)

…

clf = LinearCSVMC()

cv = CrossValidation(clf, NFoldPartitioner(),
                     errorfx=lambda p, t: np.mean(p == t),
                     enable_ca=['stats'])
…
roi_ids = None

sl = Searchlight(cv, queryengine=qe, postproc=mean_sample(), roi_ids=roi_ids)

Also, what is the difference between using Searchlight and sphere_searchlight (which is used in the other examples)? 

I don't want to run cross validation or a classifier, I just need to compute the similarity (e.g., pearson correlation) between voxels in 2 different conditions at each searchlight position, then obtain a map of those results. 

Thanks!
Jason


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20130619/886e3246/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list