[pymvpa] LinearSVM Classification Warning

Matthias Ekman Matthias.Ekman at nf.mpg.de
Tue Feb 2 19:33:24 UTC 2010


wild guess :):
because you did some selection like:

ds = ds.selectSamples(N.array([l in [3,4] for l in ds.labels],dtype='bool'))

before training/testing?
May be you could post all relevant code parts?

btw, is there any reason why your data is not counterbalanced?

cheers,
 Matthias

Geethmala wrote:
> Yes, but what is interesting is why is it not showing the warning for other
> labels? Why only 3?
> 
> Thanks,
> Geethmala
> 
> On Tue, Feb 2, 2010 at 2:19 PM, Matthias Ekman <Matthias.Ekman at nf.mpg.de>wrote:
> 
>> Hi,
>>
>> i assume you already tracked the problem, right? ;-) ... since there a
>> no samples (of class 3) in chunk, 0, 4, 5... exactly what
>>
>>>>>>  Classifier LinearCSVMC(kernel_type='linear', svm_impl='C_SVC')
>>>>>>  wasn't trained to classify labels Set([3.0]) present in testing
>>>>>>  dataset. Make sure that you have not mixed order/names of the
>>>>>>  arguments anywhere
>> says.
>>
>> cheers,
>>  Matthias
>>
>> Geethmala wrote:
>>> Here you go,
>>>
>>> Dataset / float32 153 x 40656
>>> uniq: 8 chunks 5 labels
>>> stats: mean=-0.0255406 std=0.994264 var=0.98856 min=-6.94855 max=6.71638
>>>
>>> Counts of labels in each chunk:
>>>   chunks\labels 1.0 2.0 3.0 4.0 5.0
>>>                 --- --- --- --- ---
>>>       0.0        3   6   0   9   6
>>>       1.0        3   0   6   3   6
>>>       2.0        3   6   3   3   3
>>>       3.0        0   6   9   0   6
>>>       4.0        6   0   0   3   3
>>>       5.0        6   3   0   9   0
>>>       6.0        6   6   3   6   0
>>>       7.0        3   3   9   0   6
>>>
>>> Summary per label across chunks
>>>   label mean  std min max #chunks
>>>    1    3.75 1.98  0   6     7
>>>    2    3.75 2.49  0   6     6
>>>    3    3.75  3.6  0   9     5
>>>    4    4.12 3.33  0   9     6
>>>    5    3.75 2.49  0   6     6
>>>
>>> Summary per chunk across labels
>>>   chunk mean  std min max #labels
>>>    0     4.8 3.06  0   9     4
>>>    1     3.6 2.24  0   6     4
>>>    2     3.6  1.2  3   6     5
>>>    3     4.2  3.6  0   9     3
>>>    4     2.4 2.24  0   6     3
>>>    5     3.6  3.5  0   9     3
>>>    6     4.2  2.4  0   6     4
>>>    7     4.2 3.06  0   9     4
>>>
>>>
>>> Thanks,
>>> Geethmala
>>>
>>> On Tue, Feb 2, 2010 at 2:11 PM, Matthias Ekman <Matthias.Ekman at nf.mpg.de
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> could you please post:
>>>> print ds.summary()
>>>>
>>>> .. just to make sure, that there are samples belonging to class 3 :)
>>>>
>>>>
>>>> Matthias
>>>>
>>>> Geethmala wrote:
>>>>> No, I don't have a mix of them. They are all integer values.
>>>>>
>>>>> Thanks,
>>>>> Geethmala
>>>>>
>>>>> On Tue, Feb 2, 2010 at 1:59 PM, Yaroslav Halchenko <
>>>> debian at onerussian.com>wrote:
>>>>>> it means that
>>>>>>
>>>>>>  Classifier LinearCSVMC(kernel_type='linear', svm_impl='C_SVC')
>>>>>>  wasn't trained to classify labels Set([3.0]) present in testing
>>>>>>  dataset. Make sure that you have not mixed order/names of the
>>>>>>  arguments anywhere
>>>>>>
>>>>>> Also test if you don't have a mix of float and int labels in your
>>>>>> datasets (as I remember you are manually composing those).
>>>>>>
>>>>>>
>>>>>> On Tue, 02 Feb 2010, Geethmala wrote:
>>>>>>
>>>>>>>    Hi,
>>>>>>>    I get the following warning when I run LinearCSVMC.
>>>>>>>    WARNING: Classifier LinearCSVMC(kernel_type='linear',
>>>>>> svm_impl='C_SVC')
>>>>>>>    wasn't trained to classify labels Set([3.0]) present in testing
>>>>>>>    dataset. Make sure that you have not mixed order/names of the
>>>>>> arguments
>>>>>>>    anywhere
>>>>>>>    What does this warning mean?
>>>>>>>    Thanks,
>>>>>>>    Geethmala
>>>>>>> _______________________________________________
>>>>>>> Pkg-ExpPsy-PyMVPA mailing list
>>>>>>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>>>>>>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>>>>>> --
>>>>>>                                  .-.
>>>>>> =------------------------------   /v\  ----------------------------=
>>>>>> Keep in touch                    // \\     (yoh@|www.)onerussian.com
>>>>>> Yaroslav Halchenko              /(   )\               ICQ#: 60653192
>>>>>>                   Linux User    ^^-^^    [175555]
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pkg-ExpPsy-PyMVPA mailing list
>>>>>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>>>>>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>>>>>>
>>>>>
>> ------------------------------------------------------------------------
>>>>> _______________________________________________
>>>>> Pkg-ExpPsy-PyMVPA mailing list
>>>>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>>>>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Pkg-ExpPsy-PyMVPA mailing list
>>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa



More information about the Pkg-ExpPsy-PyMVPA mailing list