![]() |
Libsvm
The LIBSVM package is new to me, as I suppose it is for many of us. I also have very little experience with working with "black box" packages. I have difficulty trusting my results. I think it might be useful to have a thread where we could share our experience and help each other learn LIBSVM.
|
Re: Libsvm
I currently struggle to understand how to use the build in cross-validation capability. I don't understand yet what exactly I don't understand, but I definitely don't understand something.
Specifically, when using 1-vs-1 classification on the digit set, I get some result for E_in error, that is close to E_out error. But whatever my parameters, the cross-validation accuracy on the problem gives me 99.8% accuracy, which is way higher than E_in or E_out. Any ideas? Code:
cva = svmtrain(Y, X, '-t 1 -d 2 -g 1 -r 1 -v 10 -c 0.01' ); |
Re: Libsvm
I am running libsvm from the command line executables. The cross validation accuracy is shown in 4 decimal places for different values of C. I also used the command line tool to scale my input data, wonder if that mattered.
|
Re: Libsvm
Quote:
I have now applied data scaling (my own version) and this did result in discrete cva measures for the various C values, although cva does seem high still |
Re: Libsvm
I'm new to libsvm (as I'm sure many other students), so my first question is how do I get E_in from svm_train?
I'm using the Java version. Thanks for any pointers. Code:
options: |
Re: Libsvm
Quote:
did you mean that 0,2% (100-99,8) is higher than your E_in and E_out? Because Accuracy = 100% - E, right? |
Re: Libsvm
Maybe I should create a separate thread for this, but I'm still stuck at trying to figure out how to get libsvm to compute E_in.
Here is a typical output (I use the command-line Java tools): Code:
optimization finished, #iter = NNNN Is there a magical switch that I am missing? Thanks. -Samir |
Re: Libsvm
Tried to use libsvm in Windows as per the Youtube video. However when I try to run svm-train.exe on the training data a1a.train it comes back with the message "cannot open the input file".
This course was going great till HW6. After that, it has become a test of working with software packages and dealing with error messages. |
Re: Libsvm
Quote:
you just have to set computed model to a variable: Code:
MyModel = svmtrain(y,X,[options]) Code:
[predicted_labels, accuracy] = svmpredict(y_test, X_test, MyModel) PS I assume using Matlab/Octave, but for other interfaces procedures is the same, difference only in sintax, I believe. |
Re: Libsvm
Thanks ... I'm using Java command-line version (hoping to get away without having to write any code in this homework).
I'll try to figure out how to do what you're suggesting in Java. -Samir |
All times are GMT -7. The time now is 04:36 AM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.