![]() |
#1
|
|||
|
|||
![]()
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.
|
#2
|
|||
|
|||
![]()
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' ); |
#3
|
|||
|
|||
![]()
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.
|
#4
|
|||
|
|||
![]() 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 Last edited by alfansome; 05-26-2012 at 10:18 AM. Reason: updated |
#5
|
|||
|
|||
![]()
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: -s svm_type : set type of SVM (default 0) 0 -- C-SVC 1 -- nu-SVC 2 -- one-class SVM 3 -- epsilon-SVR 4 -- nu-SVR -t kernel_type : set type of kernel function (default 2) 0 -- linear: u'*v 1 -- polynomial: (gamma*u'*v + coef0)^degree 2 -- radial basis function: exp(-gamma*|u-v|^2) 3 -- sigmoid: tanh(gamma*u'*v + coef0) 4 -- precomputed kernel (kernel values in training_set_file) -d degree : set degree in kernel function (default 3) -g gamma : set gamma in kernel function (default 1/num_features) -r coef0 : set coef0 in kernel function (default 0) -c cost : set the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1) -n nu : set the parameter nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5) -p epsilon : set the epsilon in loss function of epsilon-SVR (default 0.1) -m cachesize : set cache memory size in MB (default 100) -e epsilon : set tolerance of termination criterion (default 0.001) -h shrinking : whether to use the shrinking heuristics, 0 or 1 (default 1) -b probability_estimates : whether to train a SVC or SVR model for probability estimates, 0 or 1 (default 0) -wi weight : set the parameter C of class i to weight*C, for C-SVC (default 1) -v n : n-fold cross validation mode -q : quiet mode (no outputs) |
#6
|
|||
|
|||
![]() Quote:
did you mean that 0,2% (100-99,8) is higher than your E_in and E_out? Because Accuracy = 100% - E, right? |
#7
|
|||
|
|||
![]()
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 nu = XXXXXXX obj = YYYYY, rho = ZZZZZ nSV = A, nBSV = B Total nSV = C Is there a magical switch that I am missing? Thanks. -Samir |
#8
|
|||
|
|||
![]()
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. |
#9
|
|||
|
|||
![]() 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. |
#10
|
|||
|
|||
![]()
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 |
![]() |
Thread Tools | |
Display Modes | |
|
|