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
0x8A61431E.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ 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