View Single Post
  #25  
Old 05-28-2013, 03:45 AM
Elroch Elroch is offline
Invited Guest
 
Join Date: Mar 2013
Posts: 143
Default Re: on the right track?

Quote:
Originally Posted by mvellon View Post
I'm stuck half-way in this problem. I'm trying to use the C# version of libsvm and, I think it's working, but I can't corroborate the numbers I'm seeing here. Actually, I match on the # of support vectors, but my Ein and Eout numbers are significantly different.

For 0 vs. 7 with Q=2 and C=.01 I get 861 SVs but using Sign(svm_predict) and counting sign mismatches I get:

Ein=.060 and
Eout=.057

Looking at 2 vs 8 with C=.1 and Q=3, I get 721 SVs but errors are much worse:

Ein=.67
Eout=.63

Since I'm getting the right number of support vectors, I think things are somewhat ok, but I'm perplexed regarding the results from svm_predict.

One dumb question: I presume the right way to feed data into libsvm (using its data file reading capabilities) is to manually subset the data as well as to prep it for libsvm format. Is this correct? When processing 2 vs 8, for example, I'll generate a +1 for "2" data, a -1 for "8" data and then discard the rest. Is this the right approach?
Yes, you need to extract just the data for those two digits, and your outputs are as instructed in the assignment.

Since several alternative interfaces to LIBSVM have got similar results (I used the R interface through the e1071 package myself), you might consider trying a different interface, if there is one that you could use in limited time. Other than that, the combination of right looking support vector count and wrong looking errors (behaving spectacularly different in the two test runs) is difficult to explain by something you have done.
Reply With Quote