Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libSVM outputs "Line search fails in two-class probability estimates"

When I tried to train a SVM(trainsvm function) with RBF kernel,

The libSVM library outputs "Line search fails in two-class probability estimates" during training.

After training, the training accuracy of the model is just 20%.

I think I might miss something and it is related to the message.

For more information about my project,

I'm dealing with PASCAL VOC action classification problem.

I'm trying to follow this method. http://www.ifp.illinois.edu/~jyang29/papers/CVPR09-ScSPM.pdf

There are 1300 training images and 11 classes.

After making codebooks and sparse coding,

The dimension of feature vector is 2688.

The number of training example is 1370.

like image 224
winnerrrr Avatar asked Jan 25 '26 13:01

winnerrrr


1 Answers

You need to do a grid search, either using cross validation, or using a separate validation data set to get good values for C and gamma. Libsvm has a script called grid.py that is useful for this. I noticed you tagged this with matlab, using grid.py needs command line tools and a python installation (IMO this generally works out better than with matlab, especially if you have a some big machines to run many jobs in parallel).

I recommend that you read the libsvm guide if you haven't already done so: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf‎.

I also suggest you initially use the same dataset as used for the paper as occasionally published algorithms only work well on the dataset chosen for the paper.

Lastly, you could contact the authors of the paper.

like image 179
Bull Avatar answered Jan 28 '26 14:01

Bull