Dear all,

I'm trying to use the instance weighting capability of the SVC class, and I
encountered some weird behavior: when the C parameter is chosen very small
and the weights are not very large, weighted SVM yields constant
prediction...

Here is a piece of code that demonstrates this
https://dl.dropboxusercontent.com/u/2829280/wsvm_problem.py

What this does:

1. create a dummy dataset for binary classification, with a training and a
testing dataset
2. create random weights that are very very very close to one (so close
that they should not influence what follows)
3. run unweighted and weighted SVM (hereafter SVM and wSVM) with decreasing
values of C

We expect SVM and wSVM to yield exactly the same predictions because the
instance weights are ridiculously close to one. This is exactly what
happens for large to small-ish values of C; but at some point when C gets
smaller, wSVM yields constant predictions (either all zeros, or all ones)
while SVM still behaves normally...

Has anybody any clue about what's happening here? This looks like a bug,
with maybe some rounding problem somewhere???

Thanks for your help!

-- 
Sylvain Takerkart

Institut des Neurosciences de la Timone (INT)
UMR 7289 CNRS-AMU
Marseille, France
tél: +33 (0)4 91 324 007
http://www.int.univ-amu.fr/_TAKERKART-Sylvain_?lang=en
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to