[pymvpa] Sensitivity analysis also fails

Temilade Adelore temiadelore at gmail.com
Fri Apr 16 02:22:25 UTC 2010


Hello Yaroslav,

Thank you for responding.
Here the link to my code on gist <http://gist.github.com/367912>

At line 93 in the script I get the following error:

File "/usr/lib/pymodules/python2.6/matplotlib/image.py", line 294, in
set_data
raise TypeError("Invalid dimensions for image data")
TypeError: Invalid dimensions for image data

At line 116 in the script I also get the following error:

File "/usr/lib/pymodules/python2.6/mvpa/clfs/base.py", line 369, in train
if dataset.nfeatures == 0 or dataset.nsamples == 0:
AttributeError: 'NoneType' object has no attribute 'nfeatures'

However when I type in following in the shell I get:

>>> fmri_src_ev.nfeatures
405504
>>> fmri_src_ev.nsamples
44

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.

I am new to pymvpa and so I understand that I might be doing something
wrong.
Any help or suggestions would be greatly appreciated.

Thanks,
Temi Adelore


On Thu, Apr 8, 2010 at 4:55 PM, Temilade Adelore <temiadelore at gmail.com>wrote:

> Hello Experts,
>
> when I use run the following code:
>
> clf = LinearCSVMC()
>
> sclf = SplitClassifier(clf, NFoldSplitter(),
>        enable_states=['confusion', 'training_confusion'])
>
> sensitivities = \
> sclf.getSensitivityAnalyzer(combiner=None,
>
> slave_combiner=None)(fmri_src_ev)
>
> I get the error: AttributeError: 'NoneType' object has no attribute
> 'nfeatures'
>
> However when I type in "fmri_src_ev.nfeatures" in the terminal
> I get back: "405504"
>
> And so I am confused as to what might be the problem.
>
> Pls help!! Any feedback would be greatly appreciated.
>
> Thanks, Temi
>
>
>
>
> On Thu, Apr 8, 2010 at 4:22 PM, Temilade Adelore <temiadelore at gmail.com>wrote:
>
>> Hello Experts,
>> I am trying to load samples into pymvpa using the following command:
>>
>> 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)
>>
>> Each of the 10 samples correspond to a 4D NiftiImage instance.
>> I would like each sample to be a chunk, hence creating 10 chunks of data.
>> However, when I run the command above I get the following error:
>>
>> 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)]
>>
>> 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.
>> Is there anyway I can work around this? All suggestions are much
>> appreciated.
>> Thanks,
>> Temi Adelore
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20100415/3e5bb802/attachment.htm>


More information about the Pkg-ExpPsy-PyMVPA mailing list