<div dir="ltr">Here's some of the text file:<div><br></div><div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div><div>Rest 1</div></div><div><br></div><div>Oh, maybe now I'm seeing what the problem is. The second string of characters needs a whitespace after it as well maybe?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 23, 2017 at 8:01 AM,  <span dir="ltr"><<a href="mailto:pkg-exppsy-pymvpa-request@lists.alioth.debian.org" target="_blank">pkg-exppsy-pymvpa-request@lists.alioth.debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Pkg-ExpPsy-PyMVPA mailing list submissions to<br>
        <a href="mailto:pkg-exppsy-pymvpa@lists.alioth.debian.org">pkg-exppsy-pymvpa@lists.<wbr>alioth.debian.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:pkg-exppsy-pymvpa-request@lists.alioth.debian.org">pkg-exppsy-pymvpa-request@<wbr>lists.alioth.debian.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pkg-exppsy-pymvpa-owner@lists.alioth.debian.org">pkg-exppsy-pymvpa-owner@lists.<wbr>alioth.debian.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Pkg-ExpPsy-PyMVPA digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Understanding Classification + HRF (Christopher Markiewicz)<br>
   2. Re: Advice for input to SampleAttributes? Text file may have<br>
      too many columns? (Nick Oosterhof)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Wed, 22 Mar 2017 09:05:33 -0400<br>
From: Christopher Markiewicz <<a href="mailto:effigies@bu.edu">effigies@bu.edu</a>><br>
To: Development and support of PyMVPA<br>
        <<a href="mailto:pkg-exppsy-pymvpa@lists.alioth.debian.org">pkg-exppsy-pymvpa@lists.<wbr>alioth.debian.org</a>><br>
Subject: Re: [pymvpa] Understanding Classification + HRF<br>
Message-ID:<br>
        <CAHE-diO1qJiQ=<a href="mailto:3JNDboic-8C1oSkeR02HeLLByde5-dwaNsd4w@mail.gmail.com">3JNDboic-<wbr>8C1oSkeR02HeLLByde5-dwaNsd4w@<wbr>mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Anaelia,<br>
<br>
I wouldn't necessarily be concerned about the <50% classification rate. If<br>
you have 6 classes, your chance rate is ~16.7%. I'd expect a "high"<br>
classification rate for 1/6 to be something in the 25-35% range. If you're<br>
doing searchlight, you should see a normal-ish looking distribution with a<br>
mode around 16-17%.<br>
<br>
When it comes to HRF modeling events for classification, I mostly see<br>
people take two routes:<br>
<br>
1) Model one regressor for each event type (> baseline) per run, so you'll<br>
get 60 images, and each fold will train on 54 and test on 6.<br>
2) Model one regressor for each individual event, so supposing you have 30<br>
events of each type plus ten baseline per run, after z scoring, each fold<br>
will train on 1620 images and test on 180.<br>
<br>
The former tends to produce much higher cross-validation accuracies than<br>
the latter, because the variance of each class within runs is removed. It's<br>
also much faster, and HRF estimation is more stable if you're not modeling<br>
individual events.<br>
<br>
The latter is nice if conceptually what you want is to predict individual<br>
responses. I like this because the results are more intuitively<br>
interpretable. Estimation stability is an issue here for individual events,<br>
and I'd recommend checking out Mumford et al 2011 (<br>
<a href="https://dx.doi.org/10.1016/j.neuroimage.2011.08.076" rel="noreferrer" target="_blank">https://dx.doi.org/10.1016/j.<wbr>neuroimage.2011.08.076</a>). In our 2016 paper (<br>
<a href="https://dx.doi.org/10.1016/j.neuroimage.2016.07.023" rel="noreferrer" target="_blank">https://dx.doi.org/10.1016/j.<wbr>neuroimage.2016.07.023</a>), we used a variation<br>
on their method (see especially p178 ?5 and p187 ?1).<br>
<br>
For your second question: What do you mean by a "map for each class"? I'm<br>
not really sure where to start here, without a better idea of what you want<br>
the content of the map to be.<br>
<br>
Best,<br>
Chris Markiewicz<br>
<br>
<br>
On Tue, Mar 21, 2017 at 7:12 PM, Anaelia Ovalle <<a href="mailto:anaeliaovalle@gmail.com">anaeliaovalle@gmail.com</a>><br>
wrote:<br>
<br>
> Hi all,<br>
><br>
> I am a relatively new pyMVPA user and have 2 questions.<br>
><br>
> 1)<br>
><br>
> I'm working with 10 chunks of data (190 rows each) with 6 classes +<br>
> baseline and am looking to classify them using a linear classifier however<br>
> my results are <50%. I think there's something wrong with how I may be<br>
> setting this up. Being that this is a rapid-event design, I'm looking to<br>
> classify groups of voxel activity to their respective classes. In the<br>
> tutorial, I use a zscored and polydetrended dataset and apply:<br>
><br>
> clf = LinearCSVMC()<br>
> cvte = CrossValidation(clf, NFoldPartitioner(),<br>
>             errorfx= lambda p,t: np.mean(p==t),enable_ca=['<wbr>stats'])<br>
> cv_results = cvte(df)<br>
><br>
><br>
> *However, *since this is an event based task (where the subject's answer<br>
> is placed into a certain class), shouldn't I instead be looking to do an<br>
> event-related analysis, shown in : <a href="http://www.pymvpa.org/tutori" rel="noreferrer" target="_blank">http://www.pymvpa.org/tutori</a><br>
> al_eventrelated.html ? Here, would I first do some response modeling via<br>
> fitting a hemodynamic response model? If so, how does this fit into my<br>
> pattern classification?<br>
><br>
><br>
> Any clarification regarding these steps would be appreciated.<br>
><br>
><br>
> 2)<br>
><br>
> My final goal after classifying neuronal activity is to then have a map<br>
> for each class. Is this the same as doing a sensitivity mapping with the<br>
> pyMVPA functions for this?<br>
><br>
><br>
><br>
> Thank you,<br>
><br>
> Anaelia Ovalle<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Pkg-ExpPsy-PyMVPA mailing list<br>
> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170322/93c2fd16/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/pipermail/pkg-exppsy-<wbr>pymvpa/attachments/20170322/<wbr>93c2fd16/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 22 Mar 2017 14:44:48 -0300<br>
From: Nick Oosterhof <<a href="mailto:n.n.oosterhof@googlemail.com">n.n.oosterhof@googlemail.com</a>><br>
To: Development and support of PyMVPA<br>
        <<a href="mailto:pkg-exppsy-pymvpa@lists.alioth.debian.org">pkg-exppsy-pymvpa@lists.<wbr>alioth.debian.org</a>><br>
Subject: Re: [pymvpa] Advice for input to SampleAttributes? Text file<br>
        may have too many columns?<br>
Message-ID: <<a href="mailto:21795409-964E-4758-8EC4-837698378547@googlemail.com">21795409-964E-4758-8EC4-<wbr>837698378547@googlemail.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
> On 21 Mar 2017, at 16:53, Lauren Nelson <<a href="mailto:lmnelson@bu.edu">lmnelson@bu.edu</a>> wrote:<br>
><br>
> I'm having trouble passing a text file to SampleAttributes, and I -think- what my problem might be is that my text file has more columns than I thought it did. Vim seems to think it has 3894 columns.<br>
<br>
What makes you think that? Do you mean columns as in (1) strings separated by some separator string (e.g. whitespace), or (2) columns as in characters?<br>
<br>
> I have a couple questions. Does the following error message seem consistent with this?<br>
> And if so, is there a possible way to fix this? Even better, is there a way to read in an Excel spreadsheet? That's the file format I'm starting with.<br>
><br>
> >>> attr = SampleAttributes(attr_fname)<br>
> Traceback (most recent call last):<br>
>   File "<stdin>", line 1, in <module><br>
>   File "/usr/lib/python2.7/dist-<wbr>packages/mvpa2/misc/io/base.<wbr>py", line 426, in __init__<br>
>     sep=None, dtype=dtypes)<br>
>   File "/usr/lib/python2.7/dist-<wbr>packages/mvpa2/misc/io/base.<wbr>py", line 118, in __init__<br>
>     dtype=dtype, skiplines=skiplines)<br>
>   File "/usr/lib/python2.7/dist-<wbr>packages/mvpa2/misc/io/base.<wbr>py", line 258, in _from_file<br>
>     "of columns in header [%i]." % (len(l), len(hdr))<br>
> RuntimeError: Number of entries in line [3] does not match number of columns in header [2].<br>
<br>
Can you provide the output of the first few lines of your text file? PyMVPA seems to think there are either 2 or 3 columns (with meaning (1), separated by some separator string)<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
<br>
------------------------------<br>
<br>
End of Pkg-ExpPsy-PyMVPA Digest, Vol 108, Issue 9<br>
******************************<wbr>*******************<br>
</blockquote></div><br></div>