Thread: Libsvm
View Single Post
  #16  
Old 08-31-2012, 10:25 AM
itooam itooam is offline
Senior Member
 
Join Date: Jul 2012
Posts: 100
Default Re: Libsvm

Quote:
Originally Posted by jakvas View Post
I don't get any reasonable output:/

I made training sets where in ex. 0vsall i changed every zero with +1 and every other label number with -1 then i fed it libsvm using "svm-train.exe -t 1 -d 2 -g 1 -r 1 -v 10 -c 0.01 0vsall.train 0vsall.model"

after that i fed the model and the training set to svm.predict.exe but it just says everything is -1 (so not a 0) which essentialy means every 0 is mis clasified but that can't be the point of the exercise right? Can someone tell me where I'm doing something wrong?
Jakvas, what you write could actually be correct, one of the problems when using SVM's is that if the classifications in your data are not equal in size, i.e, in this case we have 90% -1s and 10% of 1s (assuming there are 10 classifiers I haven't looked?). It will train to the 90% classifier (imagine a plane above all your data point - doesn't split it - still gives a good estimate for the -1s). If you transform your data to have equal classifiers then I would expect it to train much better. Try it with the -wi parameter to equal it out? I will write back when I have done some work on this. I suspect though, this is the lesson of the homework? So for answering I don't think we should be using -wi but is a useful parameter to know for when dataset classifiers are not equally distributed in your training data.
Reply With Quote