[pymvpa] between-subject classification

Anna Manelis anna.manelis at gmail.com
Tue Sep 26 17:30:36 UTC 2017


They are (that's why I used sorted())

Thanks a lot!
Anna

On Tue, Sep 26, 2017 at 1:27 PM, Yaroslav Halchenko <debian at onerussian.com>
wrote:

>
> On Tue, 26 Sep 2017, Anna Manelis wrote:
>
> > Dear PYMVPA experts,
>
> > I plan to use PYMVPA to classify 2 groups of subjects (patients and
> > controls). The inputs are betas  that come from the FSL- based analysis
> > (i.e., cope.nii.gz). I use the SVM classifier in a specific mask on 100
> > selected features.
>
> > Could you please confirm that a short script below is correct:
>
> > # copes  are taken from /subject/feet/reg_standard/stats/ folder for
> each
> > subject.  For this example, they were copied to sub001, sub002, etc
> > folders. There is a total of N=10 subjects (in this example).
> > # I assume that each subject in a group is a chunk. Is that correct?
>
>
>
> > from glob import glob
> > import os
> > import numpy as np
> > from mvpa2.suite import*
>
> > labels=['hc','hc','hc','hc','hc','pt','pt','pt','pt','pt']
> > chunks=[1,2,3,4,5,1,2,3,4,5]    # Subject numbering within each group
>
> > copes=sorted(glob('/path/to/data/sub0*/cope14.nii.gz'))   # Collect file
>
> looks correctish assuming that your subjects ordered that there is first
> 5 hc's and then 5 pt's
>
> --
> Yaroslav O. Halchenko
> Center for Open Neuroscience     http://centerforopenneuroscience.org
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170926/34312f38/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list