[pymvpa] nperlabel question

Arteaga, Dan (NIH/NINDS) [F] dan.arteaga at nih.gov
Wed Jun 15 17:51:28 UTC 2011


I was wondering - is it possible to have an equal number of training labels per fold without balancing the number of testing labels? nperlabel='equal' seems to balance both the number of training and testing labels across entire folds (not on a per chunk basis).

Thanks.
Dan

-----Original Message-----
From: Yaroslav Halchenko [mailto:debian at onerussian.com] 
Sent: Tuesday, June 14, 2011 5:34 PM
To: Development and support pf PyMVPA
Subject: Re: [pymvpa] RFE confusion_state

sorry... didn't have change to look in detail -- I guess that doc page
of ours got outdated since it reflects how you would do RFE using 0.4.x
version of PyMVPA.  So you could do it  that way if you used 0.4.7.
Sorry about the confusion.

For 0.6.x -- here is an example from our unittests which I hope would be of
help help.  It does pretty much the same ;-)

    def test_james_problem(self):
        percent = 80
        dataset = datasets['uni2small']
        rfesvm_split = LinearCSVMC()
        fs = \
            RFE(rfesvm_split.get_sensitivity_analyzer(),
                ProxyMeasure(rfesvm_split,
                             postproc=BinaryFxNode(mean_mismatch_error,
                                                   'targets')),
                Splitter('train'),
                fselector=FractionTailSelector(
                    percent / 100.0,
                    mode='select', tail='upper'), update_sensitivity=True)

        clf = FeatureSelectionClassifier(
            LinearCSVMC(),
            # on features selected via RFE
            fs)
             # update sensitivity at each step (since we're not using the
             # same CLF as sensitivity analyzer)

        cv = CrossValidation(clf, NFoldPartitioner(), postproc=mean_sample(),
            enable_ca=['confusion'])


if you want to see the progress of RFE -- just enable debug variables
RFEC and RFEC_ for more verbosity... eg. in the environment 

export MVPA_DEBUG=RFEC,RFEC_

before running your python script

On Tue, 14 Jun 2011, Kimberly Zhou wrote:

>    Hi all,
>    I'm still trying to get recursive feature selection to work with the
>    example from
>    [1]http://dev.pymvpa.org/featsel.html#recursive-feature-elimination,
>    however I can't get past an error from the line with
>    confusion_state="confusion".
>    Here's the code:
-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic

_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa



More information about the Pkg-ExpPsy-PyMVPA mailing list