Hi Kevin.
Somehow I am sure there was a test computing that, but I can't find it any more.
I'm pretty sure I wrote that at some point.
Btw, when I used a precomputed kernel using your implementation, I got different results.
Not sure why that is.

Cheers,
Andy


On 01/27/2015 11:55 AM, kjs wrote:
Hi all,

To gain better understanding of SVC methods, I am trying to train an SVC
and then from the dual coefficients (in the kernel case) and the weights
(in the linear case) to calculate rho and to make predictions on new
feature vectors. Thus far, I am only successful in the linear case. I
have posted some sample code to a paste bin for further clarity [0].

Please help me to understand where I am going wrong. My understanding is
that rho, the constant term, should be the same for every support
vector. However, in the code, I use the average of all hard-margin
support vectors (with an absolute value less than C) to calculate rho.

I have compared the sklearn SVC results with the libsvm SVC results. As
per the documentation sklearn reports -rho from the libsvm trained SVC.

Thanks much,
Kevin

[0] http://pastebin.com/5fqdh0CV


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to