0
$\begingroup$

I am getting very poor values with a certain data set I have. I tried to use the -v option of svm-train but later realized that this does not produce any model file for prediction.

So what is the next step after running the train with -v 10. I get some output like below but do not know how to use this for any next step (of training or prediction). I have done a fair bit of reading (in SO, the guide.pd on the libsvm site) but still have a long way to go to piece the whole thing together. The ultimate goal is to improve the accuracy of the dataset I have, nothing I have done so have has helped me go beyond a 50% accuracy.

optimization finished, #iter = 267 nu = 0.641509 obj = -67.948758, rho = 0.929905 nSV = 79, nBSV = 58

 .
 .
 .

optimization finished, #iter = 236 nu = 0.864000 obj = -107.939566, rho = 0.949724 nSV = 121, nBSV = 99 Total nSV = 158 Cross Validation Accuracy = 44.8864%

$\endgroup$
  • $\begingroup$ This is a bit hard to follow. We can't know why the model doesn't predict better w/o more information about the data, the model, etc. It always could be that there isn't really a relationship. Are you just asking about the code (how it works / how to use it)? (Nb, that would be off topic here.) $\endgroup$ – gung - Reinstate Monica Apr 21 '16 at 18:40
  • $\begingroup$ No it was not a coding question but more how to use it. It took me a while to realize that using a -v does not generate a model file. $\endgroup$ – user132797 Apr 22 '16 at 12:29
0
$\begingroup$

Use the cross-validation -v option to optimize your parameters. Then run the model again using the identified optimal parameters.

In your example, it would appear that the optimal value of the $\nu$ (i.e., nu) parameter was $0.864$. Now that you know this, you can re-run the model again without -v 10 and instead with -n 0.864. The cross-validation accuracy is indeed low, but there's not enough information here to determine why.

$\endgroup$
  • $\begingroup$ Thanks for a reply. Why does the output above have only nu but say no C or gamma? On the accuracy I did ask a question on SO (stackoverflow.com/q/36374912/2129139) a while earlier but did not get a reply :-) Not sure if that was a wrong forum. $\endgroup$ – user132797 Apr 22 '16 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.