Hello Yaroslav,<br>Thank you for your response!<br><br>I am new to MVPA and so I am not clear how else I should correctly define 'chunks' for event related data. Here's the scenario:<br><br><span class="il"></span>I am trying to work out how to correctly code the chunks for:<br>
1)
An event related data with conditions within each chunk (10) presented
3.5 seconds in duration 2) and volume samples of 2 seconds duration<br>
<br>Thus a Nifti dataset with its number of samples (1315) greater than its number of chunks (609).<br><br>I am having a problem coding this in because pymvpa likes both number of sample and number of chunks to be equal.<br>
<br>How do you suggest I code in the chunks for this dataset?<br><br>Also I have managed to compound all Nifti images across all runs into one 4D data.<br>In
trying to move forward, I loaded the data as event related but did not
explicitly specify the number of chunks. However, when I try to detrend
, zscore or classify the data I get: <span style="background-color: rgb(204, 0, 0);">Memory Error</span><br>
<br>The script for reference is at <a href="http://gist.github.com/367912" target="_blank">http://gist.github.com/367912</a><br>Any help will be greatly appreciated!<br><div id=":j1" class="ii gt"><br>Thank you.</div><br>
Temi<br><br><br><br><div class="gmail_quote">
On Thu, Apr 15, 2010 at 10:22 PM, Temilade Adelore <span dir="ltr"><<a href="mailto:temiadelore@gmail.com" target="_blank">temiadelore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Yaroslav,<br><br>Thank you for responding.<br>Here the link to my code on gist <<a href="http://gist.github.com/367912" target="_blank">http://gist.github.com/367912</a>><br><br>At line 93 in the script I get the following error:<br>
<br><span style="background-color: rgb(255, 0, 0);">File "/usr/lib/pymodules/python2.6/matplotlib/image.py", line 294, in set_data</span><br style="background-color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 0, 0);">raise TypeError("Invalid dimensions for image data")</span><br style="background-color: rgb(255, 0, 0);">
<span style="background-color: rgb(255, 0, 0);">TypeError: Invalid dimensions for image data</span><br><br>At line 116 in the script I also get the following error:<br><br><span style="background-color: rgb(255, 0, 0);"></span><span style="background-color: rgb(255, 0, 0);"></span><span style="background-color: rgb(255, 0, 0);">File "/usr/lib/pymodules/python2.6/mvpa/clfs/base.py", line 369, in train</span><br style="background-color: rgb(255, 0, 0);">
<span style="background-color: rgb(255, 0, 0);">if dataset.nfeatures == 0 or dataset.nsamples == 0:</span><div><br style="background-color: rgb(255, 0, 0);">
<span style="background-color: rgb(255, 0, 0);">AttributeError: 'NoneType' object has no attribute 'nfeatures'</span><br><br></div>However when I type in following in the shell I get:<br><br>>>> fmri_src_ev.nfeatures<br>
405504<br>>>> fmri_src_ev.nsamples<br>44<br> <br>And so it is clear that my dataset (fmir_src_ev) has the nfeatures and nsamples attribute but this is not being recognized by the sensitivity analyzer/classifier.<br>
<br>I am new to pymvpa and so I understand that I might be doing something wrong.<br>Any help or suggestions would be greatly appreciated.<br><br>Thanks,<br>Temi Adelore<div><div></div><div><br><br><br><div class="gmail_quote">
On Thu, Apr 8, 2010 at 4:55 PM, Temilade Adelore <span dir="ltr"><<a href="mailto:temiadelore@gmail.com" target="_blank">temiadelore@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Experts,<br><br>when I use run the following code:<br><br>clf = LinearCSVMC()<br><br>
sclf = SplitClassifier(clf, NFoldSplitter(),<br>
enable_states=['confusion', 'training_confusion'])<br><br>
sensitivities = \<br>sclf.getSensitivityAnalyzer(combiner=None,<br><div> slave_combiner=None)(fmri_src_ev)<br><br>I get the error: AttributeError: 'NoneType' object has no attribute 'nfeatures'<br>
<br>However when I type in "fmri_src_ev.nfeatures" in the terminal<br>I get back: "405504"<br><br>And so I am confused as to what might be the problem.<br><br>Pls help!! Any feedback would be greatly appreciated.<br>
<br>Thanks, Temi<br><br><br></div><br><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 4:22 PM, Temilade Adelore <span dir="ltr"><<a href="mailto:temiadelore@gmail.com" target="_blank">temiadelore@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Experts,<br>I am trying to load samples into pymvpa using the following command:<br><br>
pre_fmri_src = NiftiDataset(samples=[fmri_src1, fmri_src2, fmri_src3, fmri_src4, fmri_src5, fmri_src6, fmri_src7, fmri_src8, fmri_src9,fmri_src10], labels=4, chunks=10, enforce_dim=None, mask=None)<br>
<br>Each of the 10 samples correspond to a 4D NiftiImage instance. <br>I would like each sample to be a chunk, hence creating 10 chunks of data.<br>However, when I run the command above I get the following error:<br><br>
<span style="background-color: rgb(255, 0, 0);">ValueError: Input volumes contain variable number of dimensions: [(136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (136, 33, 64, 64), (91, 33, 64, 64)]</span><br>
<br>I realize that the last chunk has a different dimension ( a different number of time points) however I do not see why should give me an error.<br>Is there anyway I can work around this? All suggestions are much appreciated.<br>
Thanks,<br>Temi Adelore<br>
</blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>