code snippet:<br>########<br><br>dataset = dataset.selectSamples(<br> N.array([l in [1, 2, 3, 4, 5] for l in dataset.labels],<br> dtype='bool'))<br><br>cv = CrossValidatedTransferError(<br>
TransferError(LinearCSVMC()),<br> CustomSplitter([([0,1],[2,3,4,5,6,7]), ([2,3],[0,1,4,5,6,7]), ([4,5],[0,1,2,3,6,7]), ([6,7],[0,1,2,3,4,5])], attr='chunks')<br> )<br>
<br>sl = Searchlight(cv, radius=11.0)<br><br># run searchlight on example dataset and retrieve error map<br>sl_map = sl(dataset)<br><br>print 'Best performing sphere error:', max(sl_map)<br>############<br><br>Thanks,<br>
Geethmala<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 2:33 PM, Matthias Ekman <span dir="ltr"><<a href="mailto:Matthias.Ekman@nf.mpg.de">Matthias.Ekman@nf.mpg.de</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;">
wild guess :):<br>
because you did some selection like:<br>
<br>
ds = ds.selectSamples(N.array([l in [3,4] for l in ds.labels],dtype='bool'))<br>
<br>
before training/testing?<br>
May be you could post all relevant code parts?<br>
<br>
btw, is there any reason why your data is not counterbalanced?<br>
<br>
cheers,<br>
<font color="#888888"> Matthias<br>
</font><div><div></div><div class="h5"><br>
Geethmala wrote:<br>
> Yes, but what is interesting is why is it not showing the warning for other<br>
> labels? Why only 3?<br>
><br>
> Thanks,<br>
> Geethmala<br>
><br>
> On Tue, Feb 2, 2010 at 2:19 PM, Matthias Ekman <<a href="mailto:Matthias.Ekman@nf.mpg.de">Matthias.Ekman@nf.mpg.de</a>>wrote:<br>
><br>
>> Hi,<br>
>><br>
>> i assume you already tracked the problem, right? ;-) ... since there a<br>
>> no samples (of class 3) in chunk, 0, 4, 5... exactly what<br>
>><br>
>>>>>> Classifier LinearCSVMC(kernel_type='linear', svm_impl='C_SVC')<br>
>>>>>> wasn't trained to classify labels Set([3.0]) present in testing<br>
>>>>>> dataset. Make sure that you have not mixed order/names of the<br>
>>>>>> arguments anywhere<br>
>> says.<br>
>><br>
>> cheers,<br>
>> Matthias<br>
>><br>
>> Geethmala wrote:<br>
>>> Here you go,<br>
>>><br>
>>> Dataset / float32 153 x 40656<br>
>>> uniq: 8 chunks 5 labels<br>
>>> stats: mean=-0.0255406 std=0.994264 var=0.98856 min=-6.94855 max=6.71638<br>
>>><br>
>>> Counts of labels in each chunk:<br>
>>> chunks\labels 1.0 2.0 3.0 4.0 5.0<br>
>>> --- --- --- --- ---<br>
>>> 0.0 3 6 0 9 6<br>
>>> 1.0 3 0 6 3 6<br>
>>> 2.0 3 6 3 3 3<br>
>>> 3.0 0 6 9 0 6<br>
>>> 4.0 6 0 0 3 3<br>
>>> 5.0 6 3 0 9 0<br>
>>> 6.0 6 6 3 6 0<br>
>>> 7.0 3 3 9 0 6<br>
>>><br>
>>> Summary per label across chunks<br>
>>> label mean std min max #chunks<br>
>>> 1 3.75 1.98 0 6 7<br>
>>> 2 3.75 2.49 0 6 6<br>
>>> 3 3.75 3.6 0 9 5<br>
>>> 4 4.12 3.33 0 9 6<br>
>>> 5 3.75 2.49 0 6 6<br>
>>><br>
>>> Summary per chunk across labels<br>
>>> chunk mean std min max #labels<br>
>>> 0 4.8 3.06 0 9 4<br>
>>> 1 3.6 2.24 0 6 4<br>
>>> 2 3.6 1.2 3 6 5<br>
>>> 3 4.2 3.6 0 9 3<br>
>>> 4 2.4 2.24 0 6 3<br>
>>> 5 3.6 3.5 0 9 3<br>
>>> 6 4.2 2.4 0 6 4<br>
>>> 7 4.2 3.06 0 9 4<br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> Geethmala<br>
>>><br>
>>> On Tue, Feb 2, 2010 at 2:11 PM, Matthias Ekman <<a href="mailto:Matthias.Ekman@nf.mpg.de">Matthias.Ekman@nf.mpg.de</a><br>
>>> wrote:<br>
>>><br>
>>>> Hi,<br>
>>>><br>
>>>> could you please post:<br>
>>>> print ds.summary()<br>
>>>><br>
>>>> .. just to make sure, that there are samples belonging to class 3 :)<br>
>>>><br>
>>>><br>
>>>> Matthias<br>
>>>><br>
>>>> Geethmala wrote:<br>
>>>>> No, I don't have a mix of them. They are all integer values.<br>
>>>>><br>
>>>>> Thanks,<br>
>>>>> Geethmala<br>
>>>>><br>
>>>>> On Tue, Feb 2, 2010 at 1:59 PM, Yaroslav Halchenko <<br>
>>>> <a href="mailto:debian@onerussian.com">debian@onerussian.com</a>>wrote:<br>
>>>>>> it means that<br>
>>>>>><br>
>>>>>> Classifier LinearCSVMC(kernel_type='linear', svm_impl='C_SVC')<br>
>>>>>> wasn't trained to classify labels Set([3.0]) present in testing<br>
>>>>>> dataset. Make sure that you have not mixed order/names of the<br>
>>>>>> arguments anywhere<br>
>>>>>><br>
>>>>>> Also test if you don't have a mix of float and int labels in your<br>
>>>>>> datasets (as I remember you are manually composing those).<br>
>>>>>><br>
>>>>>><br>
>>>>>> On Tue, 02 Feb 2010, Geethmala wrote:<br>
>>>>>><br>
>>>>>>> Hi,<br>
>>>>>>> I get the following warning when I run LinearCSVMC.<br>
>>>>>>> WARNING: Classifier LinearCSVMC(kernel_type='linear',<br>
>>>>>> svm_impl='C_SVC')<br>
>>>>>>> wasn't trained to classify labels Set([3.0]) present in testing<br>
>>>>>>> dataset. Make sure that you have not mixed order/names of the<br>
>>>>>> arguments<br>
>>>>>>> anywhere<br>
>>>>>>> What does this warning mean?<br>
>>>>>>> Thanks,<br>
>>>>>>> Geethmala<br>
>>>>>>> _______________________________________________<br>
>>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>
>>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
>>>>>>> <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
>>>>>> --<br>
>>>>>> .-.<br>
>>>>>> =------------------------------ /v\ ----------------------------=<br>
>>>>>> Keep in touch // \\ (yoh@|www.)<a href="http://onerussian.com" target="_blank">onerussian.com</a><br>
>>>>>> Yaroslav Halchenko /( )\ ICQ#: 60653192<br>
>>>>>> Linux User ^^-^^ [175555]<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>
>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
>>>>>> <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
>>>>>><br>
>>>>><br>
>> ------------------------------------------------------------------------<br>
>>>>> _______________________________________________<br>
>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>
>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
>>>>> <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
>>><br>
>>> ------------------------------------------------------------------------<br>
>>><br>
>>> _______________________________________________<br>
>>> Pkg-ExpPsy-PyMVPA mailing list<br>
>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
>>> <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> Pkg-ExpPsy-PyMVPA mailing list<br>
> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br>