[pymvpa] Sphere() and extent checking

Yaroslav Halchenko debian at onerussian.com
Wed Oct 19 12:41:27 UTC 2011


Hi Matthias,

in mvpa2 you would need to use something more than Sphere.  Sphere is
just defining what kind of neighborhood you are seeking for.  But
classes of QueryEngine's are there to do actual job given a specific
dataset. e.g. here is one of the examples from the
mvpa2/tests/test_neighborhood.py

which would have more.  Here is one demonstrating somewhat having
spatio-temporal neighborhood search

    sphere = ne.Sphere(1)
    ds = Dataset([data, data], fa={'s_ind': np.concatenate((ind, ind)),
                                   't_ind': np.repeat([0,1], 27)})
    qe = ne.IndexQueryEngine(s_ind=sphere, t_ind=None)
    qe.train(ds)
    qa[1]  would return neighbors for feature 1 (in space and all in time since t_ind=None in above)

helps?

On Wed, 19 Oct 2011, Matthias Ekman wrote:

>    Hi,

>    with previous versions of pymvpa (=< 0.4.7) I used

>        dataset.mapper.getNeighbors(feature_id, radius)

>    to construct nodes for a functional connectivity analysis. In mvpa2 this
>    functionality is embedded in

>        mvpa2.misc.neighborhood.Sphere()

>    However, as written in the docstring " No validation of producing
>    coordinates within any extent is done" which would be necessary for my
>    purpose.

-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic



More information about the Pkg-ExpPsy-PyMVPA mailing list