[pymvpa] 2fold balanced partitioner

basile pinsard basile.pinsard at gmail.com
Wed Jul 20 17:46:25 UTC 2016


Any idea?
Or the list is no longer working?
There is no thread archived for 3 weeks...

Thanks.

On Tue, Jul 12, 2016 at 4:54 PM, basile pinsard <basile.pinsard at gmail.com>
wrote:

> Hi everybody,
>
> It seems pretty simple but I cannot find a way to have a sensible 2fold
> partitioner with balanced targets, feeding a balanced dataset (4 classes x
> 8 samples).
> Optionally it would be sensible if all samples are used in testing the
> same number of times.
>
> ChainNode(
>
>     [ NFoldPartitioner(
>         attr='chunks',
>         cvtype=.5,
>         count=128,
>         selection_strategy='random'),
>       Sifter([('partitions', 2),('targets', dict(balanced=True)) ]) ])
> does generate balanced partitions, but will have variable number of cv
> folds, which is a problem.
>
>
> ChainNode(
>     [ NFoldPartitioner(
>         attr='chunks',
>         cvtype=.5,
>
> count=32,
>
>         selection_strategy='random'),
>
> Balancer(
>
>             amount='equal',
>
> attr='targets',
>
>             count=1,
>
> apply_selection=False,
>
>             limit=['partitions'],
>             include_offlimit=True)])
> does balance the partitions by eliminating some sample but this reduces
> the number of samples in training/testing sets, and not in a consistent way
> across folds.
>
> FactorialPartitioner does the job but the count parameter is not working
> (generate method is overloaded), then it's combinatorial yield thousands of
> splits which is a bit much.
>
> Would there be a way to repeatedly splits randomly taking half of each
> classes samples in both of the partitions?
> Or maybe should we make FactorialPartitioner to respect Partitioner
> prototype (count/strategy parameters)?
>
> Thanks.
>
> basile
>



-- 
Basile Pinsard

*PhD candidate, *
Laboratoire d'Imagerie Biomédicale, UMR S 1146 / UMR 7371, Sorbonne
Universités, UPMC, INSERM, CNRS
*Brain-Cognition-Behaviour Doctoral School **, *ED3C*, *UPMC, Sorbonne
Universités
Biomedical Sciences Doctoral School, Faculty of Medicine, Université de
Montréal
CRIUGM, Université de Montréal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20160720/067863f5/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list