[pymvpa] PyMVPA Question
Taku Ito
taku.ito1 at gmail.com
Tue Oct 29 21:49:08 UTC 2013
Awesome, thanks so much. So far so good... Hopefully it turns out ok! Just
out of curiosity, how does it choose the number of attributes to balance?
For each fold, is it a random number of balanced target labels each fold?
Or is it a fixed number (e.g., the maximum number of labels such that the
number of target labels remains equal)?
thanks for your help...
Taku
On Tue, Oct 29, 2013 at 4:19 PM, Yaroslav Halchenko
<debian at onerussian.com>wrote:
> you would need to use Balancer() in tandem with your NFoldPartitioner
>
> e.g. use following partitioner
>
> partitioner = ChainNode([NFoldPartitioner(cvtype=1),
> Balancer(attr='targets',
> count=1, # for real data > 1
> limit='partitions',
> apply_selection=True
> )],
> space='partitions')
>
> instead of plain NFoldPartitioner
>
>
> On Tue, 29 Oct 2013, Taku Ito wrote:
>
> > Hi,
> > I'm currently running through PyMVPA my first time, and ran into
> question
> > I couldn't quite figure out straightforwardly through the manual.
> > The data set that I have currently has only two target labels, but the
> > number of labels for each of the targets are unequal. �I'm curious to
> try
> > and find a way to train and test the classifier on N-Fold subsets,
> where
> > each subsets have an equal number of labels for each target value. �
> > I'm currently constructing my CrossValidation object as such:
> > clf = LinearCSVMC()
> > cvte = CrossValidation(clf, NFoldPartitioner(),
> > � � � � � � � � � � � � � � � � errorfx=lambda p, t: np.mean(p == t),
> > � � � � � � � � � � � � � � � � enable_ca=['stats'])
> > I was thinking that maybe the 3rd parameter in the documentation, the
> > 'Splitter' instance may be useful, but I was confused since the
> > documentation seems to indicate that it would split the attributes
> based
> > on the labels... �I also came across NFoldSplitter during my search
> (which
> > looked promising), but it seemed as if that object was no longer
> > supported. �Please let me know if you might have any insights!
> > Thanks,
> > Taku
> --
> 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
>
> _______________________________________________
> 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
--
Takuya Ito
Cognitive Control & Psychopathology Laboratory
Washington University in St. Louis
Cole Neuroscience Laboratory (http://www.mwcole.net/)
Center for Molecular and Behavioral Neuroscience (CMBN)
Rutgers-Newark University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20131029/1f3b0e33/attachment.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list