[pymvpa] Sensitivity map with RFE?

Yaroslav Halchenko debian at onerussian.com
Thu Jul 18 13:29:36 UTC 2013


On Thu, 18 Jul 2013, marco tettamanti wrote:

> Dear Yaroslav,

> On 07/17/2013 11:16 PM, marco tettamanti wrote:
> >I think that what you are suggesting is that I should go to GitHub and build a
> >new pymvpa version from the master. I never did that, but I can try to find out
> >how. There should be a way to build a .deb package from git, right?

> Oh no, I see, that requires building from source!
> I think I have now made it.

great -- I was about to email those lengthy instructions

    git clone git://github.com/PyMVPA/PyMVPA.git
    cd PyMVPA
    sudo apt-get build-deps python-mvpa2
    make
    export PYTHONPATH=$PWD


> And indeed!!
> The bug with the  "RuntimeError: Cannot reverse-map data since the
> original data shape is unknown. Either set `dshape` in the
> constructor, or call train()." being produced from RFE senssvm is
> now gone.

> I can now obtain a sensitivity map with RFE and the results look meaningful.

> Thank you a lot for helping me!

> I also confirm that the problem with sensvm producing the same
> result for each fold still persists:

> In [92]: print senssvm.samples
> [[ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]
>  [ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]
>  [ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]
>  [ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]
>  [ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]
>  [ 0.04880246  0.06381383  0.0809152  ...,  0.          0.          0.        ]]

> The 6 sensitivities maps for each fold are identical with each other.

and that is a bug I was mentioning which I thought we resolved...
we will look into it, meanwhile just do splitting manually
smth like (just adopting a piece of code from SplitterClassifier)

        senses = []
        for i, pset in enumerate(NFoldPartitioner().generate(dataset)):
            # split partitioned dataset
            split = [d for d in Splitter('partitions').generate(pset)]

            senses.append(senssvm(split[0]))

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



More information about the Pkg-ExpPsy-PyMVPA mailing list